Skip to content

Feature: Add Kindle clippings support #1

@texasbe2trill

Description

@texasbe2trill

Summary

KoNotes currently supports Kobo e-readers (SQLite database + HTML/TXT/Markdown exports). Several users have asked about Kindle support. This issue tracks adding a parser for Amazon Kindle's My Clippings.txt file.

Background

Kindle stores all highlights, notes, and bookmarks in a single file called My Clippings.txt located at the root of the device. The format is structured but has known quirks:

Book Title (Author Name)
- Your Highlight on page 42 | Location 639-641 | Added on Monday, March 15, 2024 12:34:56 PM

The actual highlighted text goes here.
==========

Each entry is separated by ==========. Entry types include highlights, notes, and bookmarks.

Requirements

  • Create parser/kindle_parser.py with a parse_kindle_clippings(path) -> list[Book] function
  • Handle highlights, notes, and bookmarks
  • Parse page numbers, locations, and timestamps
  • Map parsed data into existing Book and Annotation Pydantic models
  • Register .txt Kindle detection in the parser pipeline (distinguish from Kobo .txt exports)
  • Add Kindle to Supported Inputs in the README
  • Add tests in tests/test_kindle_parser.py

Considerations

  • Kindle's My Clippings.txt uses a different structure than Kobo's .txt export — the parser needs a detection heuristic (e.g., presence of ========== separators)
  • Clippings can contain entries from multiple books in a single file
  • Some fields (ISBN, publisher) won't be available — models should handle missing metadata gracefully
  • Duplicate clippings are common (Kindle appends on every highlight) — deduplication is needed

Resources

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions