Nostalgic Rumblings
The Ramblings of an Old Man




If you appreciate the lists and websites, please consider contributing to their maintenance.


Categories


November 2005
S M T W T F S
« Oct   Dec »
 12345
6789101112
13141516171819
20212223242526
27282930  


Search:


Contact Webmaster


Links


Meta

  • RSS 2.0

    The main feed; in a news aggrigator, it's the news items, in a podcast client, it's the media files


  • Comments RSS 2.0

    This is the feed for global comments (any comment made to the board); each entry has a seperate comments feed, too


© 2005 L.O.F. Communications;
All Rights Reserved

Times listed are U.S. Eastern

We don't need no much stinkin' CSS...


 
Please Keep These Pages Free; Check Out Our Sponsors by Clicking the Banner!

Check out the Geeks for great savings!
Check out the Geeks for great savings!


 

11/7/2005


Bashpodder and Poorly-Written XML Files…

Filed under: General — Charlie Summers @ 2:48 pm

I use Bashpodder to handle my auto-download-through-XML needs (that’s “podcasting” to most of you, and is different from auto-downloading-under-program-control the way most of my audio files come in), and discovered a major problem with badly-formatted XML files published by WGBH Boston; the XML files have no (or few) returns in them, causing Bashpodder to fail in finding the <enclosure> containers. (Bashpodder as written can only find one per line, and since these have everything on one line, it can only find one enclosure.)

To fix the problem, I added immediately after:

file=$(wget -q $podcast -O - |

…the following snippet:

sed s/"<enclosure"/"\n<enclosure"/g - |

…which sticks a newline right before every <enclosure> container, forcing a new line. It appears to cause no ill effects on those XML files which are written properly, only affecting those very few (in my case one) which is structured so poorly. I’m sure those who are better in un*x can find a more efficient solution, but this one appears to work.

Unfortunately, since I do not mail into Gmail, nor accept mail from Gmail, I can’t inform the developer, “linc dot fessenden at gmail dot com” so if any of you know the guy, let him know, huh?