I've a heavy user of the Toronto Public Library and recently started using Goodreads.com, so I decided to join them together. For now I just automatically take my checked out items and add them to some shelves on goodreads.
Read any news about the project at my site.
The scripts and program libraries are written in Ruby (v1.9.3) and use the following gems:
- nokogiri (1.5.5)
- oauth (0.4.6)
- rest-client (1.6.7)
From a command prompt: "gem install --no-rdoc --no-ri nokogiri oauth rest-client"
You then need a copy of the project on your system. On the project page, there are the options to: clone, zip or http/ssh/read-only. If you're going to want to stay updated, then you want to check it out with git. If you don't have those tools and just want to get started, download the zip. If you're going to be contributing back to the project, fork/clone it and away you go.
After those are installed, open a command prompt again, change to the project directory and manually:
- Copy the tpl.yml.example file to your home directory and name it .tpl; edit it with your values. If you manage multiple cards, seperate them with commas (match up the passwords with commas too).
- Run the 'bin/oauth_setup.rb' script from the project directory (i.e. "ruby bin/oauth_setup.rb") and follow the prompts to create your HOME/.goodreads yaml config file.
To run the tests, do a 'rake test' from the project directory. Note: for now many of the tests are set to 'skip' as they aren't mocked against the web. You can comment out the skip line from each test you want to confirm.
Just do a "ruby bin/tpl-checked-out.rb" from the project directory via a command prompt and it'll pull down your checked out items and push them over to goodreads for you.
Then goto your "Bookshelves" on Goodreads and you'll see the "checked-out" shelf (another with a bunch of others like 'currently-checked-out' and shelves per subject of the books.
- if a book is on another exclusive shelf it's erroring? (In my case, I 'returned-without-reading' but then checked it out again)
- For inspiration: Sacha Chua for her original script, and Gabriel Mansour for his TPL RSS script for inspiration.
- Goodreads API
- Dan Sosedoff's Goodreads Ruby library which is where I'd like some of my api calls to head.
- Arvid Andersson for his post on using minitest in Ruby 1.9.