Skip to content

Extract kindle clippings and sort them by author and book title into folders and markdown files.

Notifications You must be signed in to change notification settings

alex-schaaf/klip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

klip

A tiny Python CLI program that reads your book highlights from a connected Kindle device, sorts through the mess and organizes all clippings into per-book markdown files and saves them into author folders at a given destination folder.

Usage

The script just needs the input file and an output folder:

$ python klip.py "~/Documents/kindle_highlights"

Sync complete.
Successfuly synced 22 new highlights to ~/Documents/kindle_highlights
Skipped 901 highlights already existing at ~/Documents/kindle_highlights

This will sort everything into this folder structure:

Clippings
└─── Author A
|   |   Book A1.md
|   |   Book A2.md
...
└─── Author Z
    |   Book Z1.md

With the markdown files being formatted as follows:

# What I Talk About When I Talk About Running (Haruki Murakami)

## Page 2 | Location 26-27 | 28 January 2018 22:26:17
No matter how mundane some action might appear, keep at it long enough and it becomes a contemplative, even meditative act.

...

The program automatically checks if highlights already exist at the destination and only appends new ones to their respective files.

Installation

First clone this repository using git:

$ git clone https://github.com/alex-schaaf/klip.git

Then install the dependencies using either the provided Pipfile or manually.

Pipenv

$ pip install pipenv
$ pipenv install

Manual

$ pip install typer

Using the CLI

Run the program to export the highlights as sorted markdown files:

$ python klip.py <destination>

To export the Kindle highlights as JSON run with flag --json:

$ python klip.py <destination> --json

About

Extract kindle clippings and sort them by author and book title into folders and markdown files.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages