Slipbot kindle-import
Import reading notes from Kindle HTML exports into the slipbox. Use when user sends a Kindle notebook export file (HTML/XHTML). Parses book title and author, extracts only user's Notes (skips Highlights), then runs slipbot for each.
install
source · Clone the upstream repo
git clone https://github.com/jrswab/slipbot
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/jrswab/slipbot "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/kindle-importer" ~/.claude/skills/jrswab-slipbot-kindle-import && rm -rf "$T"
manifest:
skills/kindle-importer/SKILL.mdsource content
Kindle Import
Parse Kindle notebook exports (HTML) and create slipbox entries for user's notes.
Input Format
Kindle exports are XHTML files with this structure:
<div class="bookTitle">Book Title Here</div> <div class="authors">Author Name</div> ... <div class="sectionHeading">Chapter/Section Name</div> <div class="noteHeading">Highlight (yellow) - Section > Page X</div> <div class="noteText">Highlighted text from book</div> <div class="noteHeading">Note - Section > Page X</div> <div class="noteText">User's own note</div>
Key distinction:
starting with "Highlight" → book text → SkipnoteHeading
starting with "Note" → user's own thoughts → ImportnoteHeading
Parsing Rules
Metadata Extraction
- Book title: content of
div.bookTitle - Author: content of
div.authors - Source type:
book
Content Extraction
- Find all
elements.noteHeading - If heading starts with "Note" → get the following
content → import.noteText - If heading starts with "Highlight" → skip
- Section info (e.g., "Client-side/Stateless Sessions > Page 28") can be ignored
Workflow
- Parse file → extract book title and author
- Extract user notes → collect only Note entries (not Highlights)
- Precheck → show user: book title, author, note count, ask for confirmation
- On confirmation → for each note, invoke slipbot:
- Type: note (
prefix)- - Source:
~ book, {title} by {author} - Let slipbot handle: filename, tags, links, graph update
- Type: note (
- Report → count of notes created
Example
Input file metadata:
- Title: "The JWT Handbook"
- Author: "Sebastian E Peyrott"
Parsed entries:
Highlight (yellow) - Page 28: "This is easily solved by..." → SKIP Note - Page 28: "Applications should not allow unsigned JWTs..." → IMPORT
Slipbot call:
- Applications should not allow unsigned JWTs to be considered valid. ~ book, The JWT Handbook by Sebastian E Peyrott
Edge Cases
- No user notes (only Highlights): Report "no notes to import"
- Multiple authors: Preserve as-is from the file
- Missing author: Use "Unknown" as author
- Special characters in title/content: Preserve as-is
- HTML entities: Decode before storing (& → &, etc.)
Supported File Types
files exported from Kindle app.html- XHTML files (same structure)
- Files sent via Telegram (application/xml or text/plain mime types)