Skip to main content

Jeremy Cherfas

Further adventures in extricating Kindle notes and highlights

2 min read

Having taken a look inside the My Clippings text file extracted by Calibre, I could see that as a way to move forward. Then, Chris Aldrich commented

“If you sync your books/notes to the Kindle desktop app, you can also alternately export your notes and highlights from individual texts as raw html with one of their interface buttons from the Kindle app”.

Alas, I can see no such button. At least not on the desktop.

A little disappointed, I futzed around on the internet for a while, where the collected wisdom is not very wise. A lot of the advice riffs on “a) Copy the notes and highlights you want to share, and paste them into a txt. file or a docx file.” Either that, or it requires Evernote.

Harrumphing, I tried the Bookcision bookmarklet, on Chrome, and it works beautifully. I downloaded three different packages for the data: text, XML and JSON. The one slight problem is that I have no idea how to turn the JSON file into presentable HTML. I could do it for the XML, but while thinking about that I suddenly remembered that I do also have the Kindle app on my iPhone. No idea why, as I don't believe I'd ever read any book on the phone. (The only document in it was a podcast script, which suggests that I may have tried using it for that purpose before I discovered the brilliant Teleprompter.css in Marked 2.)

So I fired up Kindle on the phone, downloaded one of the books I'd marked up, looked at the marginalia and there was an option to share an HTML file as email. And lo, untouched, it works beautifully.

So, I need first to figure out some quiet little changes to the CSS for those notes (or not) and then I have a workflow: Read the book on Kindle (or, I suppose phone, if I'm desperate), open Kindle App on phone, export notes as HTML, prettify (or not) and copy notes to a new post, which could incorporate additional thoughts, review-like stuff etc.

Jeremy Cherfas

Jeremy Cherfas

I followed up on the Calibre option here: https://vaviblog.com/2017/extracting-notes-from-kindle-may-be-easier-than-i-thought and it looks pretty straightforward. Not sure whether Kobo will be the same.

Having said that, Wallabag as suggested by @jaduncan looks like a really useful alternative.

Jeremy Cherfas

I hadn't heard of Wallabag, although it does look very good at first sight. This self-hosting stuff is a bit scary, for me. I mean, I host my own websites on various shared servers -- mostly at Dreamiest and Gandi -- but when I tried to set up a Linode server it didn't go too well. I think I just don't know enough to be my own sysadmin.

Jeremy Cherfas

Extracting notes from Kindle may be easier than I thought.

2 min read

Further to my earlier post, I dusted off Calibre and plugged in the Kindle (two things I don't do very often).

Calibre, when connected to the Kindle, shows a text file called My Clippings. The file is very well structured, with book title, author, Note or Highlight details and the note or highlight itself.

There is no separation between books, but of course the title will have changed from one to the next. That would make it possible to break the single file into individual files, one per book.

That could be automated, but in the end it is probably quicker to do it by hand. The first time would take a while, but from then on I can just scroll to the bottom of the file, because the clippings are in chronological order.

Breaking up each note and formatting them must be automatic. But it will also be reasonably simple with decent text manipulation.

  • line 0 is ==========
  • Next line is the title, which will also be the name of the file and can be ignored.
  • Next line is - Your Highlight/Note on page xxx | location xxxx-xxxx | Added on Monday, 2 May 2016 19:22:20
    • Four pieces of information
    • Highlight or note
    • Page in book
    • Location in Kindle file
    • Date (irrelevant)
  • So it should be easy to wrap those in HTML with appropriate classes
  • Next line is blank
  • Next line is the note itself

All I need to do now is make a script to do all that. Ha.

Nifty!

Jeremy Cherfas

This warm spell is most unwelcome. Although it does mean we can have the first outdoor lunch of the year.

Jeremy Cherfas

Fagioli neri. For a non-purist chilli.

Jeremy Cherfas

What to do about bookmarked pages?

1 min read

The recent outage at Instapaper made me realise that I currently have no secure backup for either the things I've read or my notes on them. Notes live in Kindle and at Instapaper, while "things I've bookmarked" live at Instapaper and Pinboard. Good though those are, I don't have local copies, and I should.

This could take some thought. I can see no way of downloading the Kindle notes and highlights, although it is only HTML, on the surface it looks like pretty complex HTML. Instapaper is probably the same.

I should also try to have some sort of system that leaves unmarked things in Inboard and uses Instapaper specifically for things with notes.

This stuff is hard, but empowering.

Later ... Bookcision will let me get a clean copy of Kindle notes, one book at a time. Use in Chrome for preference. Calibre is also supposed to be able to do this, which might in the end be simpler.

Jeremy Cherfas

Timing is everything, and mine is slightly off. Delicious, but still. Maybe next time.

Jeremy Cherfas

Pleasantly surprised to discover that this post was somehow reproduced in full here -- albeit somewhat strangely formatted -- because I get a 404 at the original site.