On 01/08/14 20:48, lostnbronx wrote: > A fixed feed would be greatly appreciated! I confess I don't really > understand RSS very well. It probably shows.
:-) Whenever I think I understand RSS I discover I don't. For example, I got confused earlier between the <link> (a mandatory hyperlink to the item) and <guid> (an optional unique identifier for the item). There's a good tutorial at http://www.w3schools.com/RSS/rss_intro.asp if you ever want to check out this stuff. Anyway, I have attached a little Perl script (for reference, and in case you want to run it), and the result of running it on your mp3 feed. I simply took the <link> URL and made it an enclosure. I also did so when there was already an enclosure. If this isn't good then tell me and I'll hack it some more. I'll do a quick and dirty hack for the ogg feed too, but will not clog the list with that one. > I was using archive.org for hosting until about half-way through the > production of the audiobook, but then they changed in their uploading > interface (after all these years), and I suddenly couldn't get into my > account anymore. Getting technical help out of them is like wandering > in the desert, so I decided to put everything on a shared server slice > that I can control. I redid the entire feed at that time, but I guess > I did it wrong. I sympathise. I got some great help from them for a while then all went quiet. It's a shame because what they are doing in the Internet Archive is truly wonderful. > BTW, I use Listgarden to generate the feeds. There's probably a way > to get the <enclosure> tag in there. I'll look into it for the > future. I don't know I'm afraid. Worst case, a quick and dirty Perl script can solve many problems, and the XML::RSS module is your friend :-) Dave
#!/usr/bin/perl #=============================================================================== # # FILE: stardri_fix # # USAGE: ./stardri_fix # # DESCRIPTION: Script to read the 'Star Drifter' feed and add the missing # enclosures # # OPTIONS: --- # REQUIREMENTS: --- # BUGS: --- # NOTES: # AUTHOR: Dave Morriss (djm), [email protected] # VERSION: 0.0.1 # CREATED: 2014-08-01 16:53:01 # REVISION: 2014-08-01 22:02:54 # #=============================================================================== use 5.010; use strict; use warnings; use LWP::Simple 'get'; use XML::RSS; # # Star Drifter URL # my $url = 'http://www.cavalcadeaudio.com/rss/rss.stardri.mp3.xml'; # # Make an object # my $rss = XML::RSS->new(); # # Grab and parse the feed # my $feed = get($url) or die "Unable to get feed $url\n"; $rss->parse($feed); # # Walk the items in the orginal feed # foreach my $item ( @{ $rss->{'items'} } ) { $item->{'enclosure'}->{'url'} = $item->{'link'}; $item->{'enclosure'}->{'type'} = 'audio/mpeg'; } print $rss->as_string,"\n"; exit; # vim: syntax=perl:ts=8:sw=4:et:ai:tw=78:fo=tcrqn21:fdm=marker
stardri.rss
Description: application/rss
_______________________________________________ Hpr mailing list [email protected] http://hackerpublicradio.org/mailman/listinfo/hpr_hackerpublicradio.org
