A Python script to load clippings/notes/highlights from a Kindle (connected via USB) and save to a Google Sheet (or Flow Dashboard).
While https://kindle.amazon.com/your_highlights works well for purchased books, it doesn't include highlights/notes from PDFs and articles loaded onto the Kindle. Notes are saved as a .txt file on the device, but it's much more useful to collect them in a spreadsheet. This script makes it easy to automate this process.
Python 2.7
pip install -r requirements.txt
Setup for pushing notes to Flow
- Sign in to Flow
- Go to settings -> advanced, and set an API password
- Copy config.template.py to config.py and update constants
FLOW_USER_EMAIL
andFLOW_USER_PW
You'll need Google API project to authenticate the calls to Google Sheets.
Go to this wizard to create your project.
Create an oauth2 credential, and download the client_secret.json file to the main directory.
For more detailed instructions follow these steps
Create a Google Sheet. If you don't update the config, the sheet expects headers:
Id
, Type
, Quote
, Source
, Location
, Date
Copy config.template.py to config.py and update constants:
- GOOGLE_SHEET_KEY - Key of the Google Sheet you created
Each time you want to save notes from your kindle, plug it in and run:
python push_clippings.py
To run tests:
python -m unittest discover -s tests