Yapra

Yapra: require時のエラーの表示を修正

ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux](RVMでインストールしたもの) yuanying-yapra-v0.1.3-2-g8d130c0 mechanize がインストールされていない状態でmechanize を使うプラグインをロードすると、次のようなエラーメッセージが表示され…

Yapra: 東京外国語大学の「日本語で読む中東メディア」新着の全文フィードを生成する設定ファイル

News from the Middle East 日本語で読む中東メディア 新着ニュース Ruby 1.8.7 / Yapra 0.2.0 - module: Feed::Custom config: url: http://www.el.tufs.ac.jp/prmeis/html/pc/top.html extract_xpath: # capture: "#id('title_top')" # NG capture: "#titl…

Feed::Custom でエラーが出た時に pp config する

もっと根元の方で対処すると良さそうだな、と思いつつ lib-plugins/yapra/plugin/feed/custom.rb の run の中味を begin/rescue/end で囲んで pp config させただけ。 class Custom < Yapra::Plugin::MechanizeBase def run(data) begin urls = if config['u…

YapraでPixivの「お気に入りユーザー新着イラスト」をフィード化

画像はサムネイルで良いのでこんな感じで。 date が不要なら EFT 使わなくてもいいんですが…… - module: Config::WebPost config: url: "http://www.pixiv.net/login.php" params: mode: login pixiv_id: FOO pass: BAR - module: Feed::Custom config: url:…

lib/yapra/plugin/mechanize_base.rb の警告を表示させないようにする

7c7 < pipeline.context['mechanize_agent'] ||= WWW::Mechanize.new --- > pipeline.context['mechanize_agent'] ||= Mechanize.new "WWW::" を取っただけ。grep すると他にも見つかる。必要ならここらへんも直すと良いかも: ./legacy_plugins/Filter/Trans…

NHK週刊こどもニュース「ニュースまるわかり」のフィード作成用Yapraプラグイン

「ニュースまるわかり」は以前「今週の大ハテナ」だったコーナーです。 RSS::save などに渡して使ってください。 =begin config example: - module: KodomoNews::hatena config: recent: 10 # optional =end require "rubygems" require "yapra/plugin" requ…