When highlighting text in a Google Play Books ebook, the resulting notes are saved in a Document in the user's Drive. The purpose of this script is to extract the notes so that they can be saved in a more manageable format, such as Markdown.
Before we can execute the script, we need to run a few steps:
- In Google Drive, open the Notes file of the book that you wish to export;
- Click on "File" > "Download" and select "Web Page (.html, zipped)"

- Save the
.zip
file to your computer, e.g. in theDownloads
folder, and extract it.
python3 -m venv env
source env/bin/activate
python3 extractor.py --file="path/to/your/NotesfromXYZ.html"