はこべにっき# - ネトラジとPodcastをつなぐPlaggerプラグインの続き.わりと良くないコードもまじってたのでちょこちょこと修正したりした.目につく所ではFilter::FetchEnclosure::Mplayerに変換される予定のファイル形式を指定するfetchforオプションが付いたり.これを設定しないとFilter::Lameは変換元のwavファイル消す*1ので,次にPlaggerを走らせたときにFilter::FetchEnclosure::Mplayerがストリームを再度ダンプしようとしてしまう.
あと,はてブのコメントでサーバに負荷かけるほど試す人もいないんじゃない?てな意見をもらった.まー,そうかもってことでCustomFeed::SOSも晒すことにした.お試しあれ.
いまんとこ次のようなYAMLで動かしてる.Filter::Ruleがうまくつかえてない感じもするなー.
- module: Subscription::Config
config:
feed: http://lantis-net.com/haruhi/radio.html
- module: CustomFeed::SOS
- module: Filter::Rule
rule:
module: Fresh
mtime:
path: /tmp/sos.tmp
autoupdate: 1
- module: Filter::FetchEnclosure::Mplayer
config:
dir: /Users/yohei/Sites/plagger/enclosures/
fetchfor: mp3
- module: Filter::Lame
config:
dir: /Users/yohei/Sites/plagger/enclosures/
delsrc: 1
- module: Filter::RewriteEnclosureURL
config:
rewrite:
- local: /Users/yohei/Sites/plagger/enclosures/
url: http://localhost/~yohei/plagger/enclosures/
- module: Publish::Feed
config:
format: RSS
dir: /Users/yohei/Sites/plagger/podcast/
filename: sos.xml
*1:delsrc: 1