At the meeting on Sat, Scott challenged me to to come up with a Ruby version of his bashpodder script. My answer is at:
http://www.cwelug.org/cgi-bin/wiki.cgi?Rubypodder at the bottom. I am going to be testing out this script over the next several days with my podcast selections. I was able to get all of Scott's bluegrass selections and they played just fine. The script is slow, so I might switch out the pure Ruby code HTTP code with a system call to wget. As an example of how to do more complicated stuff in Ruby, I think it is illustrative. What struck me about this was how easy it was to do certain things. Such as read a file, ignore the lines beginning with a comment '#'. Split the each line into two variables. Parse the RSS and get the URL for all the mp3s in 3 lines. All of this code works in std Ruby 1.8 - no need to d/l any other libs/modules. Of course this is not the first example of using Ruby to d/l podcasts. There is a link to a more elaborate script on the wiki page. Also, here is a link to one that lets you do the reverse: create podcasts from a directory of mp3 files. http://podcast.rubyforge.org/ You will need another library to get the MP3 info. There are some enhancements I want to make, such as using the logfile the way bashpodder does. Feel free to much about with this. Please post any changes back to the Wiki. BTW, what are .m3u files? Bashpodder did something with this, but I don't understand the format or use. Ed -- Ed Howland WDT Solutions, LLC. [EMAIL PROTECTED] (314) 962-0766 _______________________________________________ CWE-LUG mailing list [email protected] http://www.cwelug.org/ http://www.cwelug.org/archives/ http://www.cwelug.org/mailinglist/
