Get the FREE Ultimate OpenClaw Setup Guide →
j

SlipBot Kindle Importer

Verified

@jrswab

npx machina-cli add skill @jrswab/slipbot-kindle-importer --openclaw
Files (1)
SKILL.md
2.7 KB

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:

  • noteHeading starting with "Highlight" → book text → Skip
  • noteHeading starting with "Note" → user's own thoughts → Import

Parsing Rules

Metadata Extraction

  1. Book title: content of .bookTitle div
  2. Author: content of .authors div
  3. Source type: book

Content Extraction

  1. Find all .noteHeading elements
  2. If heading starts with "Note" → get the following .noteText content → import
  3. If heading starts with "Highlight" → skip
  4. Section info (e.g., "Client-side/Stateless Sessions > Page 28") can be ignored

Workflow

  1. Parse file → extract book title and author
  2. Extract user notes → collect only Note entries (not Highlights)
  3. Precheck → show user: book title, author, note count, ask for confirmation
  4. On confirmation → for each note, invoke slipbot:
    • Type: note (- prefix)
    • Source: ~ book, {title} by {author}
    • Let slipbot handle: filename, tags, links, graph update
  5. 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

  • .html files exported from Kindle app
  • XHTML files (same structure)
  • Files sent via Telegram (application/xml or text/plain mime types)

Source

git clone https://clawhub.ai/jrswab/slipbot-kindle-importerView on GitHub

Overview

Parses Kindle HTML/XHTML notebook exports to import only the user’s notes into Slipbox. It extracts book title and author, skips Highlights, and runs Slipbot for each Note, preserving metadata and decoding HTML entities when needed.

How This Skill Works

The importer reads the Kindle export, grabbing the book title from .bookTitle and the author from .authors. It then finds all .noteHeading entries, importing the following .noteText only if the heading starts with 'Note' and skipping those starting with 'Highlight'. After a precheck confirmation, it invokes Slipbot for each note with type 'note' and a source string like '~ book, {title} by {author}'. Slipbot handles filenames, tags, links, and graph updates.

When to Use It

  • User provides a Kindle notebook export file (HTML/XHTML) and wants to add only their notes to Slipbox
  • Importing notes from multiple Kindle books in a batch to populate a slipbox
  • A Kindle file lacks an author; you want to default to Unknown
  • Notes are sent via Telegram as HTML/XHTML exports for quick ingestion
  • All notes are Highlights (no Notes) and should report no notes to import

Quick Start

  1. Step 1: Upload the Kindle HTML/XHTML notebook export
  2. Step 2: Review the precheck (book title, author, note count) and confirm
  3. Step 3: Let Slipbot process each imported note (type: note, source: ~ book, {title} by {author})

Best Practices

  • Always review the precheck summary (book title, author, note count) before importing
  • Preserve author information exactly as it appears in the export; if missing, use Unknown
  • Decode HTML entities (e.g., &amp; → &) before storing notes
  • Only import entries where the heading starts with 'Note' and skip 'Highlight' entries
  • Test with a small export first to verify correct note extraction and source formatting

Example Use Cases

  • Input: The JWT Handbook by Sebastian E Peyrott; Output: Slipbot entry for 'Applications should not allow unsigned JWTs to be considered valid' with source '~ book, The JWT Handbook by Sebastian E Peyrott'
  • Input: A Kindle export containing multiple books; Output: Slipbot entries created for each user Note across books
  • Input: Kindle export with only Highlights; Output: Reported as 'no notes to import'
  • Input: Kindle export with missing author; Output: Author is stored as Unknown
  • Input: Kindle HTML export sent via Telegram (HTML/XHTML); Output: Notes imported into Slipbox with proper source formatting

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers