Changeset 1906
- Timestamp:
- 12/05/06 08:02:16
- Files:
-
- branches/refactoring-email/plagger (modified) (previous)
- branches/refactoring-email/plagger/AUTHORS (modified) (1 diff)
- branches/refactoring-email/plagger/Changes (modified) (1 diff)
- branches/refactoring-email/plagger/MANIFEST (modified) (9 diffs)
- branches/refactoring-email/plagger/Makefile.PL (modified) (3 diffs)
- branches/refactoring-email/plagger/assets/plugins/CustomFeed-Script/slims_calendar.pl (added)
- branches/refactoring-email/plagger/assets/plugins/Filter-EntryFullText/baltimoresun_com.yaml (added)
- branches/refactoring-email/plagger/assets/plugins/Filter-EntryFullText/catalyst_advent.yaml (added)
- branches/refactoring-email/plagger/assets/plugins/Filter-EntryFullText/dsp_co_jp.yaml (added)
- branches/refactoring-email/plagger/assets/plugins/Filter-EntryFullText/gigazine_net.yaml (added)
- branches/refactoring-email/plagger/assets/plugins/Filter-EntryFullText/hatena_serif.yaml (added)
- branches/refactoring-email/plagger/assets/plugins/Filter-EntryFullText/mt2.pl (added)
- branches/refactoring-email/plagger/assets/plugins/Filter-EntryFullText/news_3yen_com.yaml (added)
- branches/refactoring-email/plagger/assets/plugins/Filter-EntryFullText/nifty_com_usuta.yaml (added)
- branches/refactoring-email/plagger/assets/plugins/Filter-EntryFullText/pmachine.pl (modified) (1 diff)
- branches/refactoring-email/plagger/assets/plugins/Filter-EntryFullText/slashdot_jp.yaml (modified) (1 diff)
- branches/refactoring-email/plagger/assets/plugins/Filter-EntryFullText/talesweaver_news.yaml (added)
- branches/refactoring-email/plagger/assets/plugins/Filter-TruePermalink/2chrss.yaml (modified) (1 diff)
- branches/refactoring-email/plagger/assets/plugins/Filter-TruePermalink/refrss.yaml (modified) (1 diff)
- branches/refactoring-email/plagger/assets/plugins/Notify-IRC/irc_notify.tt (modified) (1 diff)
- branches/refactoring-email/plagger/assets/plugins/Publish-Planet/sixapart-std/template/index.tt (modified) (4 diffs)
- branches/refactoring-email/plagger/deps/CustomFeed-Mixi.yaml (modified) (1 diff)
- branches/refactoring-email/plagger/deps/Filter-DegradeYouTube.yaml (added)
- branches/refactoring-email/plagger/deps/Filter-GuessTimeZoneByDomain.yaml (modified) (1 diff)
- branches/refactoring-email/plagger/deps/Filter-HTMLTidy.yaml (added)
- branches/refactoring-email/plagger/deps/Summary-AppleScript.yaml (added)
- branches/refactoring-email/plagger/deps/Summary-GetSen.yaml (modified) (1 diff)
- branches/refactoring-email/plagger/deps/Summary-Japanese.yaml (added)
- branches/refactoring-email/plagger/lib/Plagger.pm (modified) (2 diffs)
- branches/refactoring-email/plagger/lib/Plagger/Date.pm (modified) (1 diff)
- branches/refactoring-email/plagger/lib/Plagger/Plugin.pm (modified) (1 diff)
- branches/refactoring-email/plagger/lib/Plagger/Plugin/Aggregator/Simple.pm (modified) (1 diff)
- branches/refactoring-email/plagger/lib/Plagger/Plugin/Bundle/Planet.pm (modified) (3 diffs)
- branches/refactoring-email/plagger/lib/Plagger/Plugin/CustomFeed/Debug.pm (modified) (1 diff)
- branches/refactoring-email/plagger/lib/Plagger/Plugin/CustomFeed/Mailman.pm (modified) (2 diffs)
- branches/refactoring-email/plagger/lib/Plagger/Plugin/CustomFeed/Mixi.pm (modified) (3 diffs)
- branches/refactoring-email/plagger/lib/Plagger/Plugin/CustomFeed/MixiDiarySearch.pm (modified) (1 diff)
- branches/refactoring-email/plagger/lib/Plagger/Plugin/CustomFeed/POP3.pm (modified) (1 diff)
- branches/refactoring-email/plagger/lib/Plagger/Plugin/CustomFeed/Simple.pm (modified) (3 diffs)
- branches/refactoring-email/plagger/lib/Plagger/Plugin/CustomFeed/YouTube.pm (modified) (5 diffs)
- branches/refactoring-email/plagger/lib/Plagger/Plugin/Filter/2chRSSContent.pm (modified) (1 diff)
- branches/refactoring-email/plagger/lib/Plagger/Plugin/Filter/Babelfish.pm (modified) (2 diffs)
- branches/refactoring-email/plagger/lib/Plagger/Plugin/Filter/DegradeYouTube.pm (added)
- branches/refactoring-email/plagger/lib/Plagger/Plugin/Filter/EntryFullText.pm (modified) (5 diffs)
- branches/refactoring-email/plagger/lib/Plagger/Plugin/Filter/HTMLScrubber.pm (modified) (1 diff)
- branches/refactoring-email/plagger/lib/Plagger/Plugin/Filter/HTMLTidy.pm (added)
- branches/refactoring-email/plagger/lib/Plagger/Plugin/Filter/HatenaDiaryKeywordUnlink.pm (modified) (1 diff)
- branches/refactoring-email/plagger/lib/Plagger/Plugin/Namespace/MediaRSS.pm (modified) (1 diff)
- branches/refactoring-email/plagger/lib/Plagger/Plugin/Publish/Excel.pm (modified) (2 diffs)
- branches/refactoring-email/plagger/lib/Plagger/Plugin/Publish/Feed.pm (modified) (5 diffs)
- branches/refactoring-email/plagger/lib/Plagger/Plugin/Publish/Gmail.pm (modified) (1 diff)
- branches/refactoring-email/plagger/lib/Plagger/Plugin/Subscription/Bloglines.pm (modified) (2 diffs)
- branches/refactoring-email/plagger/lib/Plagger/Plugin/Subscription/Feed.pm (modified) (2 diffs)
- branches/refactoring-email/plagger/lib/Plagger/Plugin/Subscription/HatenaGroup.pm (modified) (2 diffs)
- branches/refactoring-email/plagger/lib/Plagger/Plugin/Subscription/LivedoorReader.pm (modified) (1 diff)
- branches/refactoring-email/plagger/lib/Plagger/Plugin/Summary/AppleScript.pm (added)
- branches/refactoring-email/plagger/lib/Plagger/Plugin/Summary/Japanese.pm (added)
- branches/refactoring-email/plagger/lib/Plagger/Plugin/Summary/Simple.pm (modified) (1 diff)
- branches/refactoring-email/plagger/lib/Plagger/Util.pm (modified) (1 diff)
- branches/refactoring-email/plagger/t/99-pod-spell.t (modified) (2 diffs)
- branches/refactoring-email/plagger/t/core/date-parse-jp.t (added)
- branches/refactoring-email/plagger/t/perlcriticrc (modified) (1 diff)
- branches/refactoring-email/plagger/t/plugins/Bundle-Planet/bundle.t (modified) (1 diff)
- branches/refactoring-email/plagger/t/plugins/Bundle-Planet/html.t (added)
- branches/refactoring-email/plagger/t/plugins/CustomFeed-Debug/test.t (modified) (1 diff)
- branches/refactoring-email/plagger/t/plugins/CustomFeed-Simple/test.t (modified) (1 diff)
- branches/refactoring-email/plagger/t/plugins/Filter-Babelfish/babelfish.t (modified) (3 diffs)
- branches/refactoring-email/plagger/t/plugins/Filter-DegradeYouTube (added)
- branches/refactoring-email/plagger/t/plugins/Filter-DegradeYouTube/base.t (added)
- branches/refactoring-email/plagger/t/plugins/Filter-EntryFullText/catalyst.t (added)
- branches/refactoring-email/plagger/t/plugins/Filter-EntryFullText/mt2.t (added)
- branches/refactoring-email/plagger/t/plugins/Filter-EntryFullText/serif.t (added)
- branches/refactoring-email/plagger/t/plugins/Filter-EntryFullText/slashdot.t (modified) (1 diff)
- branches/refactoring-email/plagger/t/plugins/Filter-HTMLTidy (added)
- branches/refactoring-email/plagger/t/plugins/Filter-HTMLTidy/base.t (added)
- branches/refactoring-email/plagger/t/plugins/Filter-HatenaDiaryKeywordUnlink/base.t (modified) (1 diff)
- branches/refactoring-email/plagger/t/plugins/Namespace-MediaRSS/base.t (modified) (2 diffs)
- branches/refactoring-email/plagger/t/plugins/Publish-Feed/atom1-nobody.t (added)
- branches/refactoring-email/plagger/t/plugins/Publish-Feed/atom1.t (modified) (2 diffs)
- branches/refactoring-email/plagger/t/plugins/Publish-Feed/empty-tags.t (added)
- branches/refactoring-email/plagger/t/plugins/Publish-Feed/taguri.t (added)
- branches/refactoring-email/plagger/t/plugins/Summary-AppleScript (added)
- branches/refactoring-email/plagger/t/plugins/Summary-AppleScript/base.t (added)
- branches/refactoring-email/plagger/t/plugins/Summary-Japanese (added)
- branches/refactoring-email/plagger/t/plugins/Summary-Japanese/base.t (added)
- branches/refactoring-email/plagger/t/plugins/Summary-Simple/base.t (modified) (1 diff)
- branches/refactoring-email/plagger/t/samples/flickr_new.xml (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/refactoring-email/plagger/AUTHORS
r1734 r1906 39 39 Kentaro Kuribayashi 40 40 Koichi Taniguchi 41 Nik Clayton branches/refactoring-email/plagger/Changes
r1773 r1906 1 1 The latest, HTML version of this document is always available at http://plagger.org/trac.cgi/wiki/PlaggerChangeLog 2 3 == 0.7.16 (2006/11/26) == 4 5 === Core === 6 7 * Plagger::Date->parse_dwim now supports Japanese date format 8 * $plugin->load_assets ignore .svn directory by default 9 * update DateTime and DateTime::Locale dependencies 10 11 === New Plugins === 12 13 * Summary::Japanese: Summary generator using Lingua::JA::Summarize::Japanese::Extract (miyagawa, ko) 14 * Summary::AppleScript: Summary generator using MacOSX summary service (otsune) 15 * Filter::DegradeYoutube: degrade YouTube embed video HTML (tokuhirom) 16 17 === Plugins Updates === 18 19 * Filter::EntryFullText: Update patterns for Slashdot.jp, pmachine 20 * Filter::TruePermalink: added ?fr=rdf (otsune) 21 * CustomFeed::POP3: Made it more liberal to parse Date: header 22 * Filter::Babelfish: Fixed bug around Plagger::Text 23 * Filter::HatenaDiaryKeywordUnlink: Support annonymous diary (kentaro) 24 * CustomFeed::Mixi: reworked regular expression to work with site updates. Now image links are added to enlcousres 25 * CustomFeed::Debug: Allow "entries" key. Auto set type on enclosures if not set. 26 * Filter::EntryFullText: support Japanese date format per Plagger::Date updates 27 * Subscription::Bloglines: 'dont_use_notifier_api' to work around Notifer API bug 28 * Fitler::2chRSSContent: work around with s2ch.net URL changes 29 * Notify::IRC: Update defaulte templates colors (typester) 30 * CustomFeed::Mixi: bumped WWW::Mixi deps 31 * CustomFeed::MixiDiarySearch: HTML updates 32 * Filter::EntryFullText: XPath support now works with non-Node element (nikc) 33 * Publish::Feed: fixed bugs that it emits empty category tags and nobody author elemen 34 35 == 0.7.15 (2006/11/01) == 36 37 === Core === 38 39 * bump up Encode::Detect dependency so it's easier to install 40 41 === New Plugins === 42 43 * Summary::GetSen: Use GetSen web service to get summary 44 45 === Plugins Updates === 46 47 * CustomFeed::YouTube: Update queries unencoded in YAML (mizzy) 48 * Summary::Simple: Get the first sentence if it's plain text 49 * Filter::StripRSSAd: support pheedo variant ads, RSScache.com 50 * Publish::Gmail: now allows non-UTF8 encoding by setting 'encoding' 51 * CustomFeed::Mixi: Updated regular expression to keep up with the site updates 52 * Publish::Maildir: fixed enclosure bugs 53 * Filter::Markdown: fixed configuration pass bug 54 * Filter::GuessTimeZoneByDomain: bump up DateTime::TimeZone requirement 55 * Publish::Gmail: don't die if enclosure URL is not found and thus not saved in the local 56 * CustomFeed::Script: added SSL expire example code 57 * Subscriptoin::Planet: Update Google Blog search to use Japanese version 58 * Filter::EntryFullText: show debug message if YAML mandatory key is not found 59 * Publish::Feed: fixed a critical bug that the content is always b64 encoded 2 60 3 61 == 0.7.14 (2006/10/17) == branches/refactoring-email/plagger/MANIFEST
r1773 r1906 3 3 assets/plugins/CustomFeed-Script/domain-expire.pl 4 4 assets/plugins/CustomFeed-Script/jsports-football.pl 5 assets/plugins/CustomFeed-Script/slims_calendar.pl 6 assets/plugins/CustomFeed-Script/ssl-expire.pl 5 7 assets/plugins/CustomFeed-Script/wowow-hv-51ch.pl 6 8 assets/plugins/CustomFeed-Script/wowow-liga-espanola.pl … … 15 17 assets/plugins/Filter-EntryFullText/ascii24_com.yaml 16 18 assets/plugins/Filter-EntryFullText/atmarkit.yaml 19 assets/plugins/Filter-EntryFullText/baltimoresun_com.yaml 17 20 assets/plugins/Filter-EntryFullText/barks.yaml 18 21 assets/plugins/Filter-EntryFullText/bbc.yaml … … 39 42 assets/plugins/Filter-EntryFullText/docs_info_apple_com.yaml 40 43 assets/plugins/Filter-EntryFullText/drecom.yaml 44 assets/plugins/Filter-EntryFullText/dsp_co_jp.yaml 41 45 assets/plugins/Filter-EntryFullText/eweek.yaml 42 46 assets/plugins/Filter-EntryFullText/extremetech.yaml 43 47 assets/plugins/Filter-EntryFullText/forbes.yaml 44 48 assets/plugins/Filter-EntryFullText/ft.yaml 49 assets/plugins/Filter-EntryFullText/gigazine_net.yaml 45 50 assets/plugins/Filter-EntryFullText/gyao_content.pl 46 51 assets/plugins/Filter-EntryFullText/hatena_diary.pl … … 70 75 assets/plugins/Filter-EntryFullText/matino-akari_com.yaml 71 76 assets/plugins/Filter-EntryFullText/memn0ck.yaml 77 assets/plugins/Filter-EntryFullText/mt2.pl 72 78 assets/plugins/Filter-EntryFullText/mtv-music.yaml 73 79 assets/plugins/Filter-EntryFullText/mycom_journal.yaml 74 80 assets/plugins/Filter-EntryFullText/netkeiba.yaml 81 assets/plugins/Filter-EntryFullText/news_3yen_com.yaml 75 82 assets/plugins/Filter-EntryFullText/news_com.yaml 76 83 assets/plugins/Filter-EntryFullText/news_livedoor_com.yaml 77 84 assets/plugins/Filter-EntryFullText/newsforge.yaml 85 assets/plugins/Filter-EntryFullText/nifty_com_usuta.yaml 78 86 assets/plugins/Filter-EntryFullText/nikkansports.yaml 79 87 assets/plugins/Filter-EntryFullText/nikkei.yaml … … 144 152 assets/plugins/Filter-StripRSSAd/plaza_rakuten.pat 145 153 assets/plugins/Filter-StripRSSAd/rssad_jp.pat 154 assets/plugins/Filter-StripRSSAd/rsscache.pat 146 155 assets/plugins/Filter-StripRSSAd/seesaa.pat 147 156 assets/plugins/Filter-StripRSSAd/valueclick.pat … … 229 238 deps/Filter-Babelfish.yaml 230 239 deps/Filter-BlogPet.yaml 240 deps/Filter-DegradeYouTube.yaml 231 241 deps/Filter-Delicious.yaml 232 242 deps/Filter-DeliciousFeedTags.yaml … … 322 332 deps/Subscription-XOXO.yaml 323 333 deps/Subscription-XPath.yaml 334 deps/Summary-AppleScript.yaml 324 335 deps/Summary-Auto.yaml 325 336 deps/Summary-English.yaml 337 deps/Summary-GetSen.yaml 326 338 deps/Summary-HatenaBookmark.yaml 339 deps/Summary-Japanese.yaml 327 340 deps/Summary-Simple.yaml 328 341 deps/Summary-TextOriginal.yaml … … 421 434 lib/Plagger/Plugin/Filter/BulkfeedsTerms.pm 422 435 lib/Plagger/Plugin/Filter/CompositeFeed.pm 436 lib/Plagger/Plugin/Filter/DegradeYouTube.pm 423 437 lib/Plagger/Plugin/Filter/Delicious.pm 424 438 lib/Plagger/Plugin/Filter/DeliciousFeedTags.pm … … 563 577 lib/Plagger/Plugin/Subscription/XOXO.pm 564 578 lib/Plagger/Plugin/Subscription/XPath.pm 579 lib/Plagger/Plugin/Summary/AppleScript.pm 565 580 lib/Plagger/Plugin/Summary/Auto.pm 566 581 lib/Plagger/Plugin/Summary/English.pm 582 lib/Plagger/Plugin/Summary/GetSen.pm 567 583 lib/Plagger/Plugin/Summary/HatenaBookmark.pm 584 lib/Plagger/Plugin/Summary/Japanese.pm 568 585 lib/Plagger/Plugin/Summary/Simple.pm 569 586 lib/Plagger/Plugin/Summary/TextOriginal.pm branches/refactoring-email/plagger/Makefile.PL
r1741 r1906 12 12 requires('YAML' => 0.39); 13 13 requires('Text::Tags'); 14 requires('DateTime' => 0.29); 14 requires('DateTime' => 0.35); 15 requires('DateTime::TimeZone' => 0.56); 16 requires('DateTime::Locale' => 0.32); 15 17 requires('DateTime::Format::Mail'); 16 18 requires('DateTime::Format::W3CDTF'); … … 45 47 'Better Encoding detection' => [ 46 48 -default => 0, 47 recommends('Encode::Detect' ),49 recommends('Encode::Detect', 1.0), 48 50 ], 49 51 'POD Testing' => [ … … 69 71 recommends('HTML::TreeBuilder'), 70 72 recommends('HTML::FormatText'), 73 ], 74 'Parse Japanese datetime format' => [ 75 -default => 0, 76 recommends('DateTime::Format::Japanese'), 71 77 ], 72 78 ); branches/refactoring-email/plagger/assets/plugins/Filter-EntryFullText/pmachine.pl
r966 r1906 2 2 sub handle { 3 3 my($self, $args) = @_; 4 $args->{content} =~ m! Powered by <a href="?http://www\.pmachine\.com/!si;4 $args->{content} =~ m!<a href="http://www\.pmachine\.com/">Powered by ExpressionEngine</a>!s; 5 5 } 6 6 7 7 sub extract { 8 8 my($self, $args) = @_; 9 if ($args->{content} =~ m!< h2 class="title">(?:.*?)</h2>(?:</a>)?(.*?)<\!--\n<rdf:RDF!s){9 if ($args->{content} =~ m!<div (?:id="content"|class="(?:entryBody|blogbody)")>(.*?)<div class="posted">!s){ 10 10 my $body = $1; 11 11 return "<div>$body</div>"; branches/refactoring-email/plagger/assets/plugins/Filter-EntryFullText/slashdot_jp.yaml
r515 r1906 2 2 author: Tatsuhiko Miyagawa 3 3 handle: http://slashdot.jp/.*?article\.pl\? 4 extract: (<div class="intro text">.*?</div>).*?(<div class="bodytext">.*?</div>)?4 extract: (<div class="intro">.*?</div>).*?(<div class="bodytext">.*?</div>)? 5 5 extract_capture: body more 6 6 extract_after_hook: $data->{body} .= $data->{more} if $data->{more} branches/refactoring-email/plagger/assets/plugins/Filter-TruePermalink/2chrss.yaml
r612 r1906 2 2 match: http://rss\.s2ch\.net/ 3 3 rewrite: | 4 s!rss\.s2ch\.net/test /\-/(.*?\.2ch\.net/)!$1test/read.cgi/!;4 s!rss\.s2ch\.net/test(?:\.cgi)?/\-/(.*?\.2ch\.net/)!$1test/read.cgi/!; branches/refactoring-email/plagger/assets/plugins/Filter-TruePermalink/refrss.yaml
r1632 r1906 1 1 author: youpy 2 rewrite: s/[\?&;](?: ref|from|FM)=(?:atom|rss|rssall)([&;].*)?$/defined($1) ? $1 : ''/e2 rewrite: s/[\?&;](?:fr(?:om)?|track|ref|FM)=(?:r(?:ss(?:all)?|df)|atom)([&;].*)?$/defined($1) ? $1 : ''/e branches/refactoring-email/plagger/assets/plugins/Notify-IRC/irc_notify.tt
r1570 r1906 1 [% IF feed.title %][% feed.title_text %]: [% END %][% entry.title_text %][% IF entry.author %] (03[% entry.author %] )[% END %] - 14[% entry.permalink %]1 [% IF feed.title %][% feed.title_text %]: [% END %][% entry.title_text %][% IF entry.author %] (03[% entry.author %])[% END %] - 14[% entry.permalink %] branches/refactoring-email/plagger/assets/plugins/Publish-Planet/sixapart-std/template/index.tt
r1173 r1906 16 16 <link rel="stylesheet" type="text/css" href="[% style | html %]" /> 17 17 [% END %] 18 <title>[% feed.title |html %]</title>18 <title>[% feed.title.html %]</title> 19 19 </head> 20 20 [% USE util = Plagger.Util -%] … … 24 24 <div id="banner"> 25 25 <div id="banner-inner" class="pkg"> 26 <h1 id="banner-header">[% feed.title |html %]</h1>27 <h2 id="banner-description">[% feed.description |html %]</h2>26 <h1 id="banner-header">[% feed.title.html %]</h1> 27 <h2 id="banner-description">[% feed.description.html %]</h2> 28 28 </div> 29 29 </div> … … 33 33 <div id="alpha-inner" class="pkg"> 34 34 [% FOREACH entry = entries %] 35 <a id="[% entry.id %]"></a>36 <div class="entry" id="entry-[% entry.id %]">35 <a id="[% entry.id_safe %]"></a> 36 <div class="entry" id="entry-[% entry.id_safe %]"> 37 37 <h3 class="entry-header"> 38 38 [% IF entry.source.title %] 39 <a href="[% entry.source.link | html %]">[% entry.source.title |html %]</a>:39 <a href="[% entry.source.link | html %]">[% entry.source.title.html %]</a>: 40 40 [% END %] 41 <a href="[% (entry.permalink || entry.id) | html %]">[% entry.title |html %]</a>41 <a href="[% entry.permalink | html %]">[% entry.title.html %]</a> 42 42 </h3> 43 43 <div class="entry-content"> 44 44 [% IF entry.icon %]<div class="entry-userpic"><img src="[% entry.icon.url | html %]" [% util.dumbnail(entry.icon, width=150, height=100) %] border="0" alt="[% (entry.icon.title || entry.title) | html %]" /></div>[% END %] 45 45 <div class="entry-body"> 46 [% entry.body %]46 [% entry.body.html %] 47 47 <p class="entry-footer"> 48 48 <span class="post-footers">Posted … … 71 71 [% FOREACH member = members %] 72 72 <li class="module-list-item"> 73 <a href="[% member.link | html %]">[% member.title |html %]</a>73 <a href="[% member.link | html %]">[% member.title.html %]</a> 74 74 </li> 75 75 [% END %] branches/refactoring-email/plagger/deps/CustomFeed-Mixi.yaml
r1206 r1906 2 2 author: Tatsuhiko Miyagawa 3 3 depends: 4 WWW::Mixi: 0.4 64 WWW::Mixi: 0.48 branches/refactoring-email/plagger/deps/Filter-GuessTimeZoneByDomain.yaml
r1791 r1906 2 2 author: Tatsuhiko Miyagawa 3 3 depends: 4 DateTime::TimeZone: 0.525 4 IP::Country: 0 branches/refactoring-email/plagger/deps/Summary-GetSen.yaml
r1777 r1906 3 3 depends: 4 4 XMLRPC::Lite: 0 5 bundles: 6 - Filter::GuessLanguage branches/refactoring-email/plagger/lib/Plagger.pm
r1773 r1906 1 1 package Plagger; 2 2 use strict; 3 our $VERSION = '0.7.1 4';3 our $VERSION = '0.7.16'; 4 4 5 5 use 5.8.1; … … 294 294 if (my $sub = $feed->aggregator) { 295 295 $sub->($self, { feed => $feed }); 296 $feed->aggregator(undef); # for cloning 296 297 } else { 297 298 my $ok = $self->run_hook_once('customfeed.handle', { feed => $feed }); branches/refactoring-email/plagger/lib/Plagger/Date.pm
r1749 r1906 27 27 sub parse_dwim { 28 28 my($class, $str) = @_; 29 30 return unless defined $str; 31 32 # check if it's Japanese 33 if ($str =~ /^(\x{5E73}\x{6210}|\x{662D}\x{548C}|\x{5927}\x{6B63}|\x{660E}\x{6CBB})/) { 34 eval { require DateTime::Format::Japanese }; 35 if ($@) { 36 Plagger->context->log(warn => "requires DateTime::Format::Japanese to parse '$str'"); 37 return; 38 } 39 return $class->parse( 'Japanese', encode_utf8($str) ); 40 } 29 41 30 42 require Date::Parse; branches/refactoring-email/plagger/lib/Plagger/Plugin.pm
r1734 r1906 154 154 } 155 155 156 # ignore .svn directories 157 $rule->or( 158 $rule->new->directory->name('.svn')->prune->discard, 159 $rule->new, 160 ); 161 156 162 # $rule isa File::Find::Rule 157 163 for my $file ($rule->in($self->assets_dir)) { branches/refactoring-email/plagger/lib/Plagger/Plugin/Aggregator/Simple.pm
r1769 r1906 88 88 $feed->language($remote->language); 89 89 $feed->author(_u($remote->author)); 90 $feed->updated($remote->modified) ;90 $feed->updated($remote->modified) if defined $remote->modified; 91 91 92 92 Encode::_utf8_on($$xml_ref); branches/refactoring-email/plagger/lib/Plagger/Plugin/Bundle/Planet.pm
r1744 r1906 18 18 module => 'Filter::StripTagsFromTitle', 19 19 }); 20 21 eval { require HTML::Tidy }; 22 unless ($@) { 23 $context->load_plugin({ 24 module => 'Filter::HTMLTidy', 25 }); 26 } 20 27 21 28 $context->load_plugin({ … … 82 89 filename => 'atom.xml', 83 90 format => 'Atom', 91 taguri_base => URI->new($self->conf->{url})->host, 84 92 }, 85 93 }); … … 145 153 =item Filter::StripTagsFromTitle 146 154 155 =item Filter::HTMLTidy (if HTML::Tidy is available) 156 147 157 =item Filter::HTMLScrubber 148 158 branches/refactoring-email/plagger/lib/Plagger/Plugin/CustomFeed/Debug.pm
r1473 r1906 24 24 my ($self, $context, $args) = @_; 25 25 26 my $feed = Plagger::Feed->new;26 my $feed = $args->{feed}; 27 27 $feed->type('debug'); 28 28 for (keys %{$self->conf}) { 29 next if $_ eq 'entry' ;29 next if $_ eq 'entry' || $_ eq 'entries'; 30 30 $feed->$_($self->conf->{$_}); 31 31 } 32 32 33 for my $entry_conf (@{ $self->conf->{entry}}) {33 for my $entry_conf (@{ $self->conf->{entry} || $self->conf->{entries} || [] }) { 34 34 my $entry = Plagger::Entry->new; 35 $entry->$_($entry_conf->{$_}) for keys %$entry_conf; 35 for my $method (keys %$entry_conf) { 36 next if $method eq 'enclosure'; 37 $entry->$method($entry_conf->{$method}); 38 } 36 39 $feed->add_entry($entry); 37 40 38 41 # enclosure 39 for my $enclosure_conf ( @{ $entry_conf->{enclosure} } ){ 42 my $encls = $entry_conf->{enclosure} || []; 43 $encls = [ $encls ] if ref $encls && ref $encls ne 'ARRAY'; 44 45 for my $enclosure_conf ( @$encls ) { 40 46 my $enclosure = Plagger::Enclosure->new; 41 47 $enclosure->$_($enclosure_conf->{$_}) for keys %$enclosure_conf; 48 $enclosure->auto_set_type unless defined $enclosure->type; 42 49 $entry->add_enclosure($enclosure); 43 50 } branches/refactoring-email/plagger/lib/Plagger/Plugin/CustomFeed/Mailman.pm
r480 r1906 71 71 72 72 my @matches; 73 while ($content =~ m!<LI><A HREF="(\d+\.html)">(.*?)\n</A><A NAME="(\d+)"> </A>\n<I>(.*?)\n</I>! g) {74 push @matches,{73 while ($content =~ m!<LI><A HREF="(\d+\.html)">(.*?)\n</A><A NAME="(\d+)"> </A>\n<I>(.*?)\n</I>!sg) { 74 my $data = { 75 75 link => $1, 76 76 subject => $2, … … 78 78 from => $4, 79 79 }; 80 $data->{subject} =~ tr/\n//d; 81 push @matches, $data; 80 82 } 81 83 branches/refactoring-email/plagger/lib/Plagger/Plugin/CustomFeed/Mixi.pm
r1784 r1906 179 179 my $meth = $MAP->{$type}->{get_detail}; 180 180 my($item) = $self->{mixi}->$meth($msg->{link}); 181 182 if ($meth eq 'get_view_diary') { 183 $item->{images} = $self->get_images($self->{mixi}->response->content); 184 } 181 185 $item; 182 186 }, … … 187 191 $body =~ s!(\r\n?|\n)!<br />!g; 188 192 for my $image (@{ $item->{images} }) { 189 # xxx this should be $entry->enclosures190 193 $body .= qq(<div><a href="$image->{link}"><img src="$image->{thumb_link}" style="border:0" /></a></div>); 194 my $enclosure = Plagger::Enclosure->new; 195 $enclosure->url( URI->new($image->{thumb_link}) ); 196 $enclosure->auto_set_type; 197 $enclosure->is_inline(1); 198 $entry->add_enclosure($enclosure); 191 199 } 192 200 $entry->body($body); … … 203 211 204 212 $context->update->add($feed); 213 } 214 215 sub get_images { 216 my($self, $content) = @_; 217 218 my @images; 219 while ($content =~ m!MM_openBrWindow\('(show_diary_picture\.pl\?.*?)',.*?><img src="(http://ic\d+\.mixi\.jp/p/.*?)"!g) { 220 push @images, { link => "http://mixi.jp/$1", thumb_link => $2 }; 221 } 222 223 return \@images; 205 224 } 206 225 branches/refactoring-email/plagger/lib/Plagger/Plugin/CustomFeed/MixiDiarySearch.pm
r992 r1906 58 58 <table BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=550> 59 59 <tr> 60 <td WIDTH=90 VALIGN=top ROWSPAN=5 ALIGN=center background=http://img\.mixi\.jp/img/bg_line\.gif><a href="(view_diary\.pl\?id=\d+&owner_id=\d+)"><img SRC="(http://img \.mixi\.jp/photo/member/.*?\.\w+)" VSPACE=3 border=0></a></td>60 <td WIDTH=90 VALIGN=top ROWSPAN=5 ALIGN=center background=http://img\.mixi\.jp/img/bg_line\.gif><a href="(view_diary\.pl\?id=\d+&owner_id=\d+)"><img SRC="(http://img-p\d+\.mixi\.jp/photo/member/.*?\.\w+)" VSPACE=3 border=0></a></td> 61 61 <td BGCOLOR=#FDF9F2><font COLOR=#996600>名 前</font></td> 62 62 <td COLSPAN=2 BGCOLOR=#FFFFFF>(.*?) \(.*?\) branches/refactoring-email/plagger/lib/Plagger/Plugin/CustomFeed/POP3.pm
r1172 r1906 67 67 $entry->title($email->header('Subject')); 68 68 $entry->author($email->header('From')); 69 $entry->date(Plagger::Date->parse($format, $email->header('Date'))) if $email->header('Date'); 69 70 if (my $date = $email->header('Date')) { 71 my $dt = eval { Plagger::Date->parse($format, $date) } 72 || Plagger::Date->parse_dwim($date); 73 $entry->date($dt) if $dt; 74 } 75 70 76 $entry->body($self->get_body($email)); 71 77 branches/refactoring-email/plagger/lib/Plagger/Plugin/CustomFeed/Simple.pm
r1686 r1906 45 45 46 46 my $content = decode_content($res); 47 my $title = extract_title($content);48 47 49 48 my $feed = Plagger::Feed->new; 50 $feed->title($ title);49 $feed->title($args->{feed}->title || extract_title($content)); 51 50 $feed->link($url); 52 51 … … 63 62 next if !$text || $text eq '[IMG]'; 64 63 65 my $ url = URI->new_abs($token->[1]->{href}, $url);66 next if $seen{$ url->as_string}++;64 my $item_url = URI->new_abs($token->[1]->{href}, $url); 65 next if $seen{$item_url->as_string}++; 67 66 68 67 my $entry = Plagger::Entry->new; 69 68 $entry->title($text); 70 $entry->link($ url);69 $entry->link($item_url); 71 70 $feed->add_entry($entry); 72 71 … … 84 83 my $entry = Plagger::Entry->new; 85 84 $entry->title($title); 86 $entry->link( $href);85 $entry->link(URI->new_abs($href, $url)); 87 86 $feed->add_entry($entry); 88 87 branches/refactoring-email/plagger/lib/Plagger/Plugin/CustomFeed/YouTube.pm
r1775 r1906 68 68 m!<div class="vtitle">! 69 69 and $title_flag = 1; 70 m!<a href="/watch\?v=([^"]+)" >(.+)</a>!70 m!<a href="/watch\?v=([^"]+)"[^>]+>(.+)</a>! 71 71 and do { 72 72 if($title_flag){ … … 76 76 } 77 77 }; 78 m!<img src="(http://[\w-]*static\d+(.[\w-]+)?\.youtube.com/[^">]+/[12].jpg)" class="vimg120" />! 78 # get image url 79 m!<img src="(http://[\w-]*static\d+(.[\w-]+)?\.youtube.com/[^">]+/[12].jpg)" border="0" class="vimg120" />! 79 80 and $data->{image}->{url} = $1; 81 # get description 80 82 m!<div class="vdesc">! 81 and $data->{description} = <$fh>; 83 and do { 84 <$fh>; 85 $data->{description} = <$fh>; 86 }; 87 # get tags 82 88 m!<div class="vtagLabel">Tags:</div>! 83 89 and $tag_flag = 1; 84 m!(<a href="/results\?search_ type=.*)!90 m!(<a href="/results\?search_query=.*)! 85 91 and do { 86 92 if($tag_flag){ … … 89 95 } 90 96 }; 91 m!profile\?user=([^"]+)! 97 # get author 98 m!From:</span> <a href="/user/[^>]+">([^<]+)</a>! 99 and $data->{author} = $1; 100 m/<!-- end vEntry -->/ 92 101 and do { 93 102 $context->log( info => 'Got ' . $data->{title}); 94 $data->{author} = $1;95 103 my $entry = Plagger::Entry->new; 96 104 $entry->title($data->{title}); … … 106 114 107 115 # tags 108 while( $data->{tags} =~ /<a href="\/results\?search_ type=[^"]+" class="dg">([^<]+)<\/a>/gms){116 while( $data->{tags} =~ /<a href="\/results\?search_query=[^"]+" class="dg">([^<]+)<\/a>/gms){ 109 117 $entry->add_tag($1); 110 118 } … … 129 137 if ($video_url) { 130 138 my $video_id = ( $video_url =~ /video_id=(\w+)/ )[0]; 131 132 139 my $enclosure = Plagger::Enclosure->new; 133 140 $enclosure->url( URI->new($video_url) ); branches/refactoring-email/plagger/lib/Plagger/Plugin/Filter/2chRSSContent.pm
r1417 r1906 14 14 my($self, $context, $args) = @_; 15 15 16 return unless $args->{entry}->link =~ m!\.2ch\.net/test/read\.cgi|rss\.s2ch\.net/test /\-/!;16 return unless $args->{entry}->link =~ m!\.2ch\.net/test/read\.cgi|rss\.s2ch\.net/test(\.cgi)?/\-/!; 17 17 18 18 my $body = $args->{entry}->body; branches/refactoring-email/plagger/lib/Plagger/Plugin/Filter/Babelfish.pm
r1741 r1906 52 52 }; 53 53 54 my $title = $args->{entry}->title ;54 my $title = $args->{entry}->title->data; 55 55 my $title_tr = $self->translate($translator, $title, $language); 56 56 unless (defined $title_tr) { … … 64 64 sleep 1; 65 65 66 my $body = $args->{entry}->body ;66 my $body = $args->{entry}->body->data; 67 67 my $body_tr = $self->translate($translator, $body, $language); 68 68
