http://github.com/gabrielmansour/tpl-rss
created by Gabriel Mansour
Provides an RSS (Atom) Feed of books checked out from the Toronto Public Library
based on the Perl script by Sacha Chua
This script requires:
- WWW::Mechanize --
sudo gem install mechanize
- Nokogiri versions newer than 1.2.3
Fill in your library card number and PIN, and run the script ruby tpl-rss.rb
to generate the feed and save it out to a file (by default it's saved as books.atom
).
Tip: you can schedule a recurring task using cron
(or Windows Task Scheduler) that will automatically refresh the feed at a set interval. For example, to update the feed on a daily basis, add the following line to your crontab:
0 0 * * * cd /path/containing/tpl-rss; ./tpl-rss.rb $LIBRARY_CARD_NUMBER $PIN $PATH_TO_OUTPUT_FILE
Then you can just add the URL for the books.atom file you've just created to your feed reader and you're all set!
- New Features:
-
allows loading of personal account credentials from yaml file
-
saves outputted XML to a file
-
allows you to also pass in location of output file as third command-line argument
-
now able to pass in library card number & pin as command-line arguments
-
raises an error if login credentials are incorrect
-
- Bugfixes:
- improved shebang
- fixed up generated XML to better adhere to Atom standard