From 5b2e7e91ebbab005e9a8dc69c603402e7fdc6a32 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 20 Jul 2011 23:03:13 +0000 Subject: seperated text and title diff --git a/rhimport-dn b/rhimport-dn index bf72584..644f729 100755 --- a/rhimport-dn +++ b/rhimport-dn @@ -80,9 +80,10 @@ my $feed = XML::Feed->parse(URI->new('http://www.democracynow.org/podcast.xml')) my $file = ""; for my $entry ($feed->entries) { if($entry->enclosure && $entry->enclosure->type eq "audio/mpeg") { - my $summary = $entry->title . "\n\n" . $entry->summary->body . "\n\n" . $entry->link . "\n"; + my $sum_title = $entry->title; + my $sum_text = $entry->summary->body . "\n" . $entry->link; - if($entry->id =~ /tag:democracynow.org,([0-9-]+):media\/mp3download\/[^\/]+/) { + if($entry->id =~ /tag:democracynow.org,([0-9-]+):media\/mp3download\/[^\/]+/) { next if($y ne $1); my $ff = File::Fetch->new(uri => $entry->enclosure->url); @@ -90,7 +91,7 @@ for my $entry ($feed->entries) { $file = $ff->fetch( to => '/tmp' ) or die $ff->error; print "ok\n"; - print "summary:\n" . $summary; + print "summary:\n" . $sum_title . "\n\n" . $sum_text . "\n"; } print "\n"; } -- cgit v0.10.2