Hi everyone, thanks for your great work developing Joplin. I created a Python script that imports highlights and annotations from a Kindle eReader device into Joplin. Please feel free to test it and/or improve it.
It creates a notebook in Joplin and individual notes for each book inside that notebook. All the highlights and annotations for each book are stored in the same note and separated by a horizontal line. When a note for a book already exists, this script updates the note with the new highlights.
Download this package
git clone https://gitlab.com/seawind/kindle-highlights-in-joplin.git
Getting your kindle highlights and annotations in Joplin
- Access the folder
- Open the file
conf.pyand enter your Koplin Token.
- To find your Joplin Token, open Joplin and access to Tools -> Options -> Web Clipper. Enable the web clipper service and copy your authorisation token in the
tokenvariable in the
- Define a name for the notebook in Joplin in which you want to store your highlights.
- Connect your Kindle device and find the path to the file where your highlights and notes are stored. It is usually inside the folder
Documents. The name of the file depends on the language in your device. In English it is
My Clippings.txt, or in Spanish
- Copy the path in the variable
path_highlightsin the file
conf.py looks like this:
token = 'your_token' folder = 'Kindle highlights' path_highlights = '/path/to/your/Kindle/My Clippings.txt'
- Open a terminal in the
kindle-highlights-in-joplinfolder and run the next command:
This script has been tested with the highlights stored in a Kindle D01100. It might be different for other models.
Kindle eReaders usually store the highlights and notes in a txt file. The name of the file depends on the language in which the device is configured.
The elements stored in that file follow a specific structure, a specific sequence of characters separates individual highlights. The metadata for each highlight is written in the language of the device. This package uses regular expressions to retrieve the metadata to build a unique identifier for each highlight. So far, it includes keywords in Spanish and English to identify the relevant data. You can add keywords for a different language in the
This script is based on the great work of @foxmask who created the
joplin-api for Python.