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/&quot\;//g; $toPod =~ s/&nbsp\;//g; $toPod =~ s/&lt;.+?&gt\;//g; ###-------------------### print IPOD "$toPod\n"; } } print IPOD "*\n"; } close IPOD; }

In reply to RSS Feeds on iPod by munchie

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.