Changeset 1607
- Timestamp:
- 08/27/06 15:28:57
- Files:
-
- branches/hackathon-summary/plagger/lib/Plagger/Plugin/Aggregator/Simple.pm (modified) (1 diff)
- branches/hackathon-summary/plagger/lib/Plagger/Plugin/Filter/GuessLanguage.pm (modified) (1 diff)
- branches/hackathon-summary/plagger/lib/Plagger/Util.pm (modified) (2 diffs)
- branches/hackathon-summary/plagger/t/samples/atom10-example.xml (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/hackathon-summary/plagger/lib/Plagger/Plugin/Aggregator/Simple.pm
r1580 r1607 143 143 $entry->summary($summary) if $summary; 144 144 145 # per-entry level language support in Atom 146 if ($e->{entry}->content && $e->{entry}->content->lang) { 147 $entry->language($e->{entry}->content->lang); 148 } 149 145 150 # enclosure support, to be added to XML::Feed 146 151 if ($remote->format =~ /^RSS / and my $encls = $e->{entry}->{enclosure}) { branches/hackathon-summary/plagger/lib/Plagger/Plugin/Filter/GuessLanguage.pm
r1554 r1607 121 121 my ($self, $context, $args) = @_; 122 122 123 return $args->{entry}-> {language} if $args->{entry}->{language};123 return $args->{entry}->language if $args->{entry}->language; 124 124 125 125 $context->log(debug => "start guessing entry's language"); branches/hackathon-summary/plagger/lib/Plagger/Util.pm
r1549 r1607 28 28 sub strip_html { 29 29 my $html = shift; 30 utf8::decode($html); 30 31 31 32 eval { … … 46 47 my $formatter = HTML::FormatText->new(leftmargin => 0); 47 48 my $text = $formatter->format($tree); 49 # utf8::decode($text); 48 50 $text =~ s/\s*$//s; 49 51 $text; branches/hackathon-summary/plagger/t/samples/atom10-example.xml
r1201 r1607 1 1 <?xml version="1.0" encoding="utf-8"?> 2 <feed xmlns="http://www.w3.org/2005/Atom" >2 <feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"> 3 3 4 4 <title>Example Feed</title> … … 18 18 </entry> 19 19 20 <entry> 21 <title>Atom-Powered Robots Run Amok</title> 22 <link href="http://example.org/2003/12/13/atom03"/> 23 <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id> 24 <updated>2003-12-13T18:30:02Z</updated> 25 <summary>Some text.</summary> 26 <content type="xhtml" xml:lang="ja"> 27 <div xmlns="http://www.w3.org/1999/xhtml">foo</div> 28 </content> 29 </entry> 30 20 31 </feed>
