Railscasts downloader script
run it to download all railscasts, re-run it to update with newly released ones. Just run it in the folder where you want to keep them. yes, I could have used the word run a couple more times.
it's on github
#!/usr/bin/ruby require 'rss' p 'Downloading rss index' rss_string = open('http://feeds.feedburner.com/railscasts').read rss = RSS::Parser.parse(rss_string, false) videos_urls = rss.items.map { |it| it.enclosure.url }.reverse videos_filenames = videos_urls.map {|url| url.split('/').last } existing_filenames = Dir.glob('*.mov') missing_filenames = videos_filenames - existing_filenames p "Downloading #{missing_filenames.size} missing videos" missing_videos_urls = videos_urls.select { |video_url| missing_filenames.any? { |filename| video_url.match filename } } missing_videos_urls.each do |video_url| filename = video_url.split('/').last p filename p %x(wget #{video_url} -O #{filename}.tmp ) p %x(mv #{filename}.tmp #{filename} ) end p 'Finished synchronization'
Trackbacks
Use the following link to trackback from your own site:
http://maximilianoguzman.com.ar/trackbacks?article_id=5
Thanks, for the info. I have been looking this for quite long.
Thank you very Much!!! I was trying to doing the job with wget, but I guess is enough. Cheers!!
Thanks for the script!
Awesome! Very useful script!
I know that writing ruby scripts is important for gathering knowledge, but I have shorter solution http://niczsoft.com/2010/01/download-all-railscasts/ using wget :)
I figured out a much quicker way to do this.
if you’re using Firefox install the Flashgot addon
Go to http://feeds.feedburner.com/railscasts Right click and select Flashgot all than pick the files / filetypes you want (there should be a checkbox for it say .mov (200) 300) or how many episodes there were and just click Ok and proceed like with any other download.
Hope it helps
PS should work with any equivalent software
Unfortunately, the script no longer works.
Couldn’t resist https://github.com/kulbirsaini/Railscasts-Sync :-)
PS : That “it’s on github” link is too small.. I saw that after creating my own repo :|
This is the greatest topic I have read today
Great read! You might want to follow up to this topic???
Thanks for this great post. Did you do it all on your own? This must’ve taken a lot of time