
kindle-to-obsidian
Convert Kindle highlights into tagged Markdown and create Obsidian book notes with a Goodreads Web Clipper template.
Kindle to Obsidian
Turn exported Kindle highlights into tagged Markdown, and create book notes from Goodreads with Obsidian Web Clipper.
This is the small toolkit behind my reading workflow. It handles the copying and formatting so I can spend more time revisiting the highlights, finding connections, and writing about what I read.
The workflow has two parts, which you can use together or separately:
| Tool | What it does |
|---|---|
| Kindle highlight converter | Converts a Kindle notebook HTML export into Markdown stored in a .txt file. Highlight colours become tags; comments, chapter headings, and available page numbers are carried across. |
| Goodreads Web Clipper template | Creates an Obsidian book note with metadata from Goodreads and headings for your own ideas and review. |
What the book note looks like
An example from my vault. The colours, fonts, icons, and heading counters come from my Obsidian setup; the template supplies the properties and headings. The screenshot includes values I have edited, such as my rating and reading status.
The workflow
- Read on Kindle and highlight passages.
- Export the book's notebook as an HTML file from the Kindle app for Mac.
- Run the converter to turn those highlights into tagged Markdown.
- Open the book on Goodreads and use Web Clipper to create its note in Obsidian.
- Paste the converted highlights under Reference notes.
- Revisit the highlights, adjust the tags, and write your own summary or review.
The converter gives each highlight its own tagged parent bullet, keeping the order and chapter structure in the export. Grouping highlights into themes happens during the review step.
1. Set up the converter
You need Python 3.10 or newer. The only direct Python dependency is Beautiful Soup.
Download this repository using Code → Download ZIP, extract it, and open Terminal in the extracted folder containing README.md.
macOS or Linux
Run these commands once:
python3 -m venv .venv
.venv/bin/python -m pip install -r requirements.txt
Try the included sample:
.venv/bin/python extract_app_color_codes.py examples/kindle-notebook.html --out converted/sample.txt
Open converted/sample.txt. It should match the example output. The sample passages are invented for this demonstration.
Windows
Use these commands in PowerShell from the same folder:
py -m venv .venv
.venv\Scripts\python.exe -m pip install -r requirements.txt
.venv\Scripts\python.exe extract_app_color_codes.py examples/kindle-notebook.html --out converted/sample.txt
For the remaining examples, Windows users can replace .venv/bin/python with .venv\Scripts\python.exe.
2. Convert your Kindle highlights
In the Kindle app for Mac, open the book's notebook and use Export to save an HTML file. This converter is built for that notebook export format. It does not read My Clippings.txt, EPUBs, PDFs, or a Kindle account directly.
Place your HTML export in the included exports folder. Then run:
.venv/bin/python extract_app_color_codes.py "exports/My Book.html"
This creates exports/My Book.txt. The file contains Markdown, despite its .txt extension.
To choose the output location or use a .md extension:
.venv/bin/python extract_app_color_codes.py "exports/My Book.html" --out "converted/My Book.md"
The destination folder must already exist. Running the same command again replaces the output file at that path.
You can also omit the input path. In that case, the script selects the most recently modified *.html file in your current Terminal folder, not necessarily the folder containing the script. Passing the path explicitly is usually clearer.
How colours become tags
| Kindle highlight colour | Output | How I use it |
|---|---|---|
| Yellow | 🟡 #idea | Central ideas, arguments, and principles |
| Aqua or blue | 🔵 #story | Stories, examples, and anecdotes |
| Pink | 🩷 #quote | Passages worth keeping in the author's own words |
| Green | 🟢 #source | Studies, books, people, and other references |
| Orange | 🟠 #thought | Passages connected to my own thoughts or questions |
| An unrecognised colour | ⚪ #highlight | Highlights to classify later |
The converter uses the colour recorded in the export. It does not infer what a passage means. If all your exported highlights are yellow, they will all start as #idea.
Ordinary Kindle comments become nested Note: bullets, regardless of the highlight's colour. For example:
- 🟡 #idea [[Leverage MOC]]
- A useful tool makes a small effort go further (p. 12).
- Note: Compare this with the way I take reading notes.
The optional [[Leverage MOC]] link comes from a recognised Kindle comment. See customising colours and links.
3. Import the Goodreads template
Install Obsidian Web Clipper in your browser and have your Obsidian vault available.
- Open Web Clipper and select the Settings cog.
- Open any template, then choose Import, or drag
goodreads-clipper.jsoninto the template area. - Open the imported Goodreads template.
- Set the destination vault. Review the note folder, which defaults to
resources/book. - Change or remove the
publicationproperty if you do not want my personal value,arunak.
These import steps follow Obsidian's template documentation.
Open a Goodreads book page whose URL begins with https://www.goodreads.com/book/, then open Web Clipper. The matching template should be selected automatically. Preview the title and properties, then click Add to Obsidian.
The note name is built from the book title and contributor names. The template also requests the author, genres, page count, year, Goodreads rating, cover URL, ISBN, language, description, source URL, and clipping date. Results depend on the metadata present in the page.
The starting properties include type: book, status: in queue, and empty rating and related fields. You can change these in the template or in the finished note.
The review headings include:
- One-line takeaway
- What the book is about
- Why I picked up this book
- Ideas and takeaways
- How the book changed the way I think
- Best quotes and passages
- Should you read the book
- Coffee chat
- Reference notes
- Quotes to sort
Several headings insert the book title automatically. Paste your converted highlights under Reference notes, then work through them at your own pace.
Details and troubleshooting
- No
bs4module: installrequirements.txtusing the same Python interpreter you use to run the script. - “Could not find .bodyContainer”: the input does not match the expected Kindle notebook HTML structure. Export the notebook again from Kindle for Mac.
- Missing page numbers: citations are added when an English
Page Nlabel is present. Kindle location numbers are not converted or retained as citations. - Missing Goodreads properties: preview the page in Web Clipper. Goodreads layouts, editions, and loaded metadata vary; some fields may need manual correction.
- The wrong template opens: select Goodreads manually and review the template order. Web Clipper uses the first matching trigger.
Highlight text is extracted as plain text, with whitespace collapsed. Formatting within a passage, such as italics and paragraph breaks, is not retained. English highlight labels are expected. Highlights omitted from the original export cannot be recovered by the converter.
The Python converter reads the selected local HTML file and writes the output locally. It makes no network requests and does not scan your Obsidian vault. The Goodreads step uses Web Clipper in your browser.
More information
- Customise tags, MOC links, properties, and headings
- Release notes
- Repository setup and publishing copy
Created by Aruna Kumarasiri.
Licence
The code, template, and original documentation are available under the MIT licence. Third-party book metadata and interface elements shown in the screenshot remain subject to their respective rights.
How to Install
- Download the template file from GitHub
- Move it anywhere in your vault (or your sidebar notes)
- Open it in Obsidian — done!
Stats
Stars
0
Forks
0
License
MIT
Last updated 2mo ago
Categories