I guess this could qualify as a CUFP. It read a config file that looks something like this:
H
iPodLounge http://www.ipodlounge.com/index.xml title description
BoingBoing http://boingboing.net/rss.xml title description
TopSellingGames http://www.lockergnome.com/amazon/rss.php?id=95 title
Where the 1st line is the drive letter of the iPod, and the other lines are the title of the output file, then the url, then the attributes you want to be included within the txt file. Note, I parsed the xml and stripped html by hand (no modules) because this is a science project (Pennsylvania Junior Academy of Science) and I'll probably get a better score if I don't just use modules to do everything for me. Also note, this is a Windows only program- no iPod on linux.
#! Perl
use strict;
use diagnostics;
use LWP::UserAgent;
my @feedlist;
open NEWSCONFIG, "inews.cfg";
while(<NEWSCONFIG>) {
push(@feedlist,$_);
}
close NEWSCONFIG;
foreach(@feedlist) {
chomp;
}
my $driveletter = shift(@feedlist);
foreach my $newsfeed (@feedlist) {
my @includes;
my $url;
my $filename;
@includes = split(/\s/, $newsfeed);
$filename = shift(@includes);
$url = shift(@includes);
######-Get Feeds From The Internet-#####
my $ua = LWP::UserAgent->new;
$ua->agent("iNews News Aggregator");
# Create a request
my $req = HTTP::Request->new(GET => $url);
# Pass request to the user agent and get a response back
my $feedObj = $ua->request($req);
# Check the outcome of the response
######-----------------------------#####
my @items;
my $feedtext = $feedObj->content;
print "Generating Output..";
$feedtext =~ s/\n//g;
print "..";
open IPOD, "> $driveletter".":\\notes\\"."$filename" or die;
@items = split/<item/, $feedtext;
shift(@items);
print "..";
foreach my $item (@items) {
foreach my $attrib (@includes) {
if ($item =~ /<$attrib>(.*)<\/$attrib>/) {
my $toPod = $1;
###-Strip Markup Tags-###
$toPod =~ s/<.+?>//g;
$toPod =~ s/"\;//g;
$toPod =~ s/ \;//g;
$toPod =~ s/<.+?>\;//g;
###-------------------###
print IPOD "$toPod\n";
}
}
print IPOD "*\n";
}
close IPOD;
}