/ Analogpixel / blog

Processing Kindle Highlights

April 25, 2020

have you ever read a book, and then come back to it few months or years later and have no Idea what the book is about? All that time you took to read that book pretty much wasted. And when it comes to all those kindle highlights you have, do you ever do anything with them? I’ve seen services that offer to mail you random highlights every day, but in the long run, you’ll just forget those too, so what’s the point? You need a way to convert those highlights into long term usable data.

In the book, How to Take Smart Notes (Sönke Ahrens), he covers the Zettelkasten NoteTaking System, and in this system is the idea that you shouldn’t just clip quotes, but instead, clip the quote, and then re-write that quote in your own words; thus showing you actually understand what you just clipped. The other thing that needs to be done is correctly tagging the note, so when you have hundreds of these notes (across multiple books) you can see how they are related and connected.

Based on that, this is the workflow I use for collecting kindle highlights:

The Technical

The full source of the importer can be found here https://github.com/analogpixel/personal-wiki/blob/master/cli/parseKindle.py

Parsing the clippings file is pretty straightforward in python:

clip_file="/Volumes/Kindle/documents/My Clippings.txt"

with open(clip_file, "r") as f:
  for line in f:
    tmp = line.strip().split("(")

    if len(tmp) == 2:
      book_title = tmp[0]
      book_author = tmp[1][0:-1]
    else:
      book_title = tmp[0]
      book_author = "none"

    book_info = f.__next__().strip()
    blank_line = f.__next__().strip()
    quote = f.__next__().strip()
    eoq = f.__next__().strip()