ã¨ããããã¯ã¦ãªãã¤ã¢ãªã¼ãã°ã«ã¼ãã®ããããã¼ã¸éå®ã§APIã使ã£ã¦ãã£ã¼ããæ¢ãã¦ã¿ãã9æ¥åã®å±¥æ´ä¸è©²å½ã¯51件ãã£ã¦ããã£ã¼ããè¦ã¤ãã£ãã®ã¯35åã§æªç»é²ã¯11åã ã£ããã¬ã¹ãã³ã¹ã¯ä¸ç¬ã§è¿ã£ã¦ããã
#!/usr/bin/perl use strict; use warnings; use File::Mork; use LWP::Simple; #use YAML; my $m = File::Mork->new('history.dat', verbose =>1) or die; #print Dump $m->entries; my @hatenas = map $_->{URL}, grep $_->{URL} =~ m{^http://(?:[a-z0-9]+\.)?[gd]\.hatena\.ne\.jp/[a-z0-9]+/$}i, $m->entries; my $api = 'http://rpc.reader.livedoor.com/feed/discover?links='; my $opml = get($api . join "\n", @hatenas); open my $fh, '>', 'feed.opml'; print {$fh} $opml;