A Ruby gem for getting your Kindle highlights from Amazon.
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 5 commits ahead, 41 commits behind speric:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.idea
lib
test
.gitignore
MIT-LICENSE
README.markdown
Rakefile.rb

README.markdown

kindle-highlights

Get your Kindle highlights via Amazon's Kindle site

There's currently no Kindle API, so https://github.com/speric built a backup and I modified it https://github.com/g0t4

Required gems

  • Mechanize

The workflow

  • Login
  • Scrape books from "Your Books"
  • Recursively scrape comments from paginated json API
  • Save each book by ASIN with book details and items

I forked this because the original version pulled from "Your Highlights" which is now a page with infinite scroll. The backup was only pulling from the last book you interacted with as far as I could tell.

Use Cases

I modified this to not be a gem but to just be a reusable script that you can run via a Rakefile, this way it's much easier to modify the source code to suit your needs.

  • rake backup
    • backup everything
    • add amazon.yaml to root of project with email, password, and save_location
  • rake backup_one
    • backup just one book by ASIN
    • setup amazon.yaml as above and add backup_one with the ASIN of the book you want to backup
  • rake test_parse_book
  • rake test_save_book