BlogtrottrでWe couldn't find any working feeds onとなる対処法 Category: Evernote Archive: 2011年12月

foursquareのチェックイン履歴をEvernoteに送りたいと思い、みんな大好きBlogtrottrを使おうと企てましたが、We couldn't find any working feeds onなんちゃらエラーにさいなまれました。

原因

(foursquareの吐く)RSSのContent-Type指定がオカシイ。

結論

自分のもってるサーバに一時的にコピーして、Content-Typeを吐かせて、それをBlogtrottrに送る。

手順

LinuxでWebサーバがうごいててrootもってる前提です。

1. RSSとってくるシェルスクリプトを作る。

$ vi /var/www/html/****/****.sh
#!/bin/sh

# ------------------
# Environments
DIR='/var/www/html/****'
URL='https://feeds.foursquare.com/history/****.rss'
# ------------------

wget -O "$DIR/4sq.rss" $URL

2. シェルスクリプトをcrontabで定期的に呼ぶようにする。

$ crontab -e
20 4 * * * /var/www/html/****/****.sh

3. .htaccess(httpd.conf)でContent-Typeを設定する。

$ vi /var/www/html/****/.htaccess
AddType text/xml .rss

お、これで定期的にfoursquareのRSSをLinuxサーバにコピーした上で、Blogtrottrに渡せた! でももっといいやり方ありそうやなー、考える。。

Date: 2011/12/02 18:37 Comment(s): 0

No Comments Yet

  • コメント内に URI を含む場合、管理者の承認後に表示されます。