[sbm] del.icio.us to hatebu
del.icio.us ã«ç»é²ããã¨ã³ããªãã¯ã¦ãã«ã·ã³ã¯ãããããã®ã¬ã·ããï¼æ¥ï¼ååãããããªç¨éãæ³å®ãã¦ãã¾ããdel.icio.us ã«ç»é²ããé çªã§ã¯ã¦ãã«ç»é²ãããããã« del.icio.us ã® RSS ã®ã¨ã³ããªã¼ã®é åºãé転ãããããã®ãã£ã«ã¿ (Reverse) ãç¨æãã¾ãããdel.icio.us ã® RSS ãå ¥åã¨ãã¦ããã®ã§ãç»é²ã¨ã³ããªæ°ãå¤ã㨠RSS ããæ¼ãã¦ãã¾ãã¨ã³ããªãçºçããã¨ããåé¡ãããã¾ããdel.icio.us API ã§åååå¾ããã¨ã³ããªã¼ä»¥éãåå¾ã§ããã°å®ç§ãªã®ã§ãããã¨ããããéç¨ã§ã«ãã¼ãã¦ãã¾ãã(ç§ã¯ï¼æ¥ï¼ï¼ã¨ã³ããªãããã¯ãã¼ã¯ããªãã®ã§....)
global: # plugin_path: **** # assets_path: **** timezone: Asia/Tokyo log: level: info plugins: - module: Subscription::Config config: feed: - url: http://del.icio.us/rss/****** - module: Aggregator::Simple - module: Filter::Reverse # remove entries older than mtime of tmp file. - module: Filter::Rule rule: module: Fresh mtime: path: ****/plagger/cache/plagger-delicious2hatebu.tmp autoupdate: 1 - module: Filter::DeliciousFeedTags - module: Publish::HatenaBookmark config: username: ******* password: ******* interval: 8 post_body: 1
Filter/Reverse.pm
package Plagger::Plugin::Filter::Reverse; use strict; use base qw( Plagger::Plugin ); sub register { my($self, $context) = @_; $context->register_hook( $self, 'update.feed.fixup' => \&feed ); } sub feed { my($self, $context, $args) = @_; $context->log(debug => "reverse"); my @entries = $args->{feed}->entries; @entries = reverse(@entries); $args->{feed}->{entries} = \@entries; } 1;