A Python script that extracts your Kindle highlights and notes, formatting them beautifully for Obsidian, a powerful knowledge management app.
- Overview
- Features
- Requirements
- Installation
- Usage
- Customizing the Output
- How It Works
- FAQ
- Related Obsidian Systems
- Star History
- License
This script processes your Kindle’s My Clippings.txt file by:
- Extracting highlights (and any accompanying notes)
- Organizing them into separate text files—one per publication
- Formatting the output using Markdown, which makes it easy to copy/paste into Obsidian
It’s an integral part of my personal Obsidian Book Note system, but it’s flexible enough for any user looking to integrate their Kindle clippings into Obsidian.
- Creates separate Markdown files for each book
- Formats highlights with proper Obsidian syntax
- Preserves metadata (book title, author)
- Intelligently handles new highlights when run multiple times
- Allows selective processing of specific books
- Customizable output format
- Python 3
- Unix-based terminal (Linux, macOS, BSD, etc.)
- A Kindle with highlights saved in
My Clippings.txt
- Clone this repository or download the script:
git clone https://github.com/dannberg/kindle-clippings-to-obsidian.git- Install Dependency:
pip install -r requirements.txt- Make the script executable:
chmod +x extract-kindle-clippings.py-
Create highlights on your Kindle as you read.
-
Connect your Kindle to your computer and locate the
My Clippings.txtfile in thedocumentsfolder. -
Run the script with the following command:
./extract-kindle-clippings.py [<path to My Clippings.txt>] -o [<output directory>]Example:
./extract-kindle-clippings.py /Users/USERNAME/Desktop/Temp/My\ Clippings.txt -o /Users/USERNAME/Desktop/Temp/clippings/Default values:
- If no input file is specified, the script looks for
./My Clippings.txtor/media/$USER/Kindle/documents/My Clippings.txt - If no output directory is specified, files are created in a
clippings/folder in the current directory
-
Select which books to process from the interactive menu:
- Enter
0to process all books - Enter a single number to process one specific book
- Enter multiple numbers separated by spaces to process several books
- Enter
-
Import into Obsidian by copying the content from the generated Markdown files.
Highlights from The Personal MBA: Master the Art of Business
============================================================
Authors:: [[Josh Kaufman]]
Recommended By::
Tags:: [[📚 Books]]
# The Personal MBA: Master the Art of Business
### Highlights
- It is important that students bring a certain ragamuffin, barefoot irreverence to their studies; they are not here to worship what is known, but to question it. —JACOB BRONOWSKI, WRITER AND PRESENTER OF THE ASCENT OF MAN
- Every successful business (1) creates or provides something of value that (2) other people want or need (3) at a price they're willing to pay, in a way that (4) satisfies the purchaser's needs and expectations and (5) provides the business sufficient revenue to make it worthwhile for the owners to continue operation.You can easily customize how your highlights appear in Obsidian by modifying the output format in the script:
- Open
extract-kindle-clippings.pyin any text editor - Locate the section around lines 226-231 where the output formatting is defined
- Edit the strings to match your preferred format
- Use
\nto create line breaks - Modify the metadata fields to match your Obsidian workflow
- Use
For example, you might want to add additional YAML frontmatter or change the heading structure.
The script works by:
- Reading your Kindle's
My Clippings.txtfile - Parsing each highlight's metadata (book title, author, location, date)
- Generating a unique hash for each highlight to avoid duplicates
- Checking existing output files to see which highlights are new
- Creating formatted Markdown files for each book with 3+ highlights
- Appending highlights from books with fewer notes to a
short_notes.mdfile
The script is smart enough to only add new highlights when run multiple times, so you can safely run it whenever you add new highlights to your Kindle.
Q: What about Kindle Notes (not just highlights)?
A: The script captures both highlights and notes. Notes may require some additional manual formatting to make them look perfect in Obsidian. Feel free to open a PR if you get Notes working in a way you like!
Q: Can I edit the output files?
A: Yes! You can rename, move, split, combine, and edit the output files. The script uses hash values to track which highlights have been processed.
Q: Does this work with all Kindle models?
A: The script has been tested with first-generation Kindle Oasis, but should work with most Kindle models that generate a My Clippings.txt file.
Q: Will this work on Windows?
A: This script was designed for Linux/Mac/BSD and may have issues on Windows.
Blog Posts
- Obsidian Daily Note system
- Obsidian People Note system
- Obsidian Book Note system
- Daily Driver Task Management System
Video Tutorials
- My Obsidian Daily Note Template video
- My Obsidian Meeting Note Template video
- My Obsidian People Note Template video
Additional Resources
Copyright 2025, Dann Berg (dannb.org)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.