sairam / railscasts_offline

RailsCasts Offline helps download RailsCasts videos and AsciiCasts can be downloaded for offline viewing. You can even watch these episodes via iTunes Podcasts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Scraper for Railscasts

Disclaimer

  • This was a code written in mid 2011 when I got frustrated with my internet connection and was eager to go through Railscasts.
  • No standards were followed during the making of these files.

Written for ruby 1.9.3

# requires rubygems
gem install nokogiri

Setup

mkdir -p railscasts/{free,pro,revised}/{raw,asciicasts} railscasts/{free,pro,revised}/asciicasts/images
cd railscasts
wget http://railscasts.com/assets/railscasts_logo.png
wget http://www.feedicons.com/download/feedicons-standard.zip
unzip feedicons-standard.zip && rm feedicons-standard.zip
mv feed-icon-14x14.png feed-icon-small.png
mv feed-icon-28x28.png feed-icon.png
cd ..

Configuring

Fill up your subscription code, cookie token and target_url where you plan to host.

cp subscription_code.rb.example subscription_code.rb
# Open http://railscasts.com
# copy cookie and subscription code
vim subscription_code.rb

Getting the latest episode versions

ruby download_episodes.rb # This will populate the wget urls in the free, pro and revised
# run ruby download_episodes.rb 0 for the first time to download all the versions . Otherwise only last 1 page in the railscasts list will be considered for download
sh wget   #  script to download all the files.
ruby generate_index.html.rb # to generate the index.html, index.rss for viewing on a web browser

TODO

  1. add a script given the username and password fetches and populates subscription_code.rb
  2. Fix publication dates in RSS Feeds
  3. Refactor code in classes.

LICENSE

See LICENSE file for distribution

All free RailsCasts episodes are under the Creative Commons license. You are free to distribute unedited versions of those episodes for non-commercial purposes. You are also free to translate them into any language. If you would like to edit the video please contact Ryan Bates. All pro and revised episodes are not licensed for redistribution.

About

RailsCasts Offline helps download RailsCasts videos and AsciiCasts can be downloaded for offline viewing. You can even watch these episodes via iTunes Podcasts


Languages

Language:CSS 71.2%Language:Ruby 27.5%Language:HTML 1.2%