Skip to content
A simple python script to extract clippings from 'My Clippings.txt', organize, store and output them in a more elegant way.
Python
Find file
Latest commit 940ceaa Jun 8, 2015 @lxyu Merge pull request #3 from tevino/json
use json
Failed to load latest commit information.
output
.gitignore ignore .DS_Store Dec 1, 2012
README.rst
kindle.py use json Jun 8, 2015

README.rst

Kindle Clippings

A simple python script to extract clippings from 'My Clippings.txt', organize, store and output them in a more elegant way.

Features

Clippings are stored in a python dict with this structure

clips = {'book': {'position': 'clipping'}}

Msgpack was used to serialize clippings for archive.

Each new My Clippings.txt will add clips to previous archive automatically.

Clips will be export to output directory, find them there.

It's EASY and you don't need to care nothing!

Usage

Install msgpack-python first.

$ pip install msgpack-python

Clone project and put MyClippings.txt to project's root.

Run kindle.py

$ python kindle.py

DONE!

Demo

Example output files tree:

$ tree .
.
├── My Clippings.txt
├── README.rst
├── clips.msgpack
├── kindle.py
└── output
    ├── Hackers & Painters (Paul Graham).txt
    ├── Life of Pi (Yann Martel).txt

Example output file contet:

Nerds aren't losers. They're just playing a different game, and a game much closer to the one played in the real world. Adults know this. It's hard to find successful adults now who don't claim to have been nerds in high school.

---

What hackers and painters have in common is that they're both makers. Along with composers, architects, and writers, what hackers and painters are trying to do is make good things. They're not doing research per se, though if in the course of trying to make good things they discover some new technique, so much the better.

---

This is not a problem for big companies, because they don't win by making great products. Big companies win by sucking less than other big companies.

Something went wrong with that request. Please try again.