🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

SlipBot Kindle Importer

by @jrswab

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.

Versionv1.0.0
Downloads1,233
TERMINAL
clawhub install slipbot-kindle-importer

πŸ“– About This Skill


name: kindle-import description: 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.

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:

Book Title Here
Author Name
...
Chapter/Section Name
Highlight (yellow) - Section > Page X
Highlighted text from book
Note - Section > Page X
User's own note

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)
  • πŸ’‘ Examples

    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