Exporting From Kindle

What’s the best way to export highlighted passages and margin notes from Kindle to Tinderbox?

IMO, the best option here is Readwise.io. Nice export feature. Works in Safari + app
Syncs well for me with Kindle, https://readwise.io

Tom

1 Like

If you care to, you can use the share extension to share individual notes and quotations to Apple Notes, perhaps creating a Folder for a particular book, or one folder for all, and deal with it in TBX.

I’ve just tried the Kindle Mac app, and there are fewer sharing options (none) in that than the iPad app. For my purposes, the iPad offers the best experience in terms of sharing content from books I read in Kindle, whether to Apple Notes, or to Twitter and the like.

Just tried to screenshot a portion of a Kindle page (could have also used the Kindle Notebook for the source as well), thinking there would be some kind of Live Text prompt, but I didn’t see one. Text Sniper will capture text from a screenshot and place it on the clipboard where you can then paste it into a new note, or perhaps perform some automated action on it to send it to a note in Tinderbox.

1 Like

I’ve done this for a while …

  1. Sign into Amazon.com
  2. Split screen between notebook and tbx file
  3. Select multiple quotes from selected book
  4. Drag into tbx
  5. Explode note ( using some of the kindle text that separates each note typically “yellow index location …”
  6. stamp to add attributes of book/author etc…

A bit of a clunky workflow perhaps but pretty quick and the explode option by creating its own folder means you can safely experiment to get the splits right

Beautiful Soup Documentation — Beautiful Soup 4.9.0 documentation I have been contemplating using Beautiful soup to create a small python program to webscrape the kindle note book site as each highlight is tagged as <span id=“highlight”'> and so easy to extract

3 Likes

That’s good - thanks Tom

Do any of these work if the Kindle book has DRM?

Yes, I believe they all do.

My workflow is:

  1. Export the Kindle highlights from the iOS or iPadOS app in the HTML format. It’s the easiest one to process.
  2. Paste into a note in Tinderbox.
  3. Explode the note with the following settings:

Delimiter: \n(?=Highlight|Note|Bookmark)
Actions: action($Text("ExplodeCode"))

The body of the ExplodeCode note is the following. It’ll set the $Page, $KindleLocation, $Color, $Text, $Name and $Prototype:

$Page=runCommand("grep -o 'Page\s[0-9]*'",$Text).split("\W+").at(1);
$KindleLocation=runCommand("grep -o 'Location\s[0-9]*'",$Text).split("\W+").at(1);
var type;
type=runCommand("grep -oE '^Highlight|Note|Bookmark'",$Text).replace("^\s+").replace("\s+$");
if(type=="Highlight") {$Color=$Text.split("\n").at(0).replace("(Highlight\s\()(\w+)(\).*)", "$2")};
$Prototype="Kindle"+type;
$Text=$Text.replace("Highlight.*?\n");
$Name=$Text.split("\.").at(0).replace("\n");

Here’s a template with the whole setup:
Booknotes-alexchabot.tbx (1.1 MB)

4 Likes

Building on Tom’s answer, readwise is incredible because you can import so many other sources into readwise, i.e. Instapaper, iBooks, and even paper books.

Here is my workflow:

  1. All highlights go to readwise
  2. Readwise syncs to Obsidian — I get well formatted markdown files.
  3. If you want, you’d then be able to watch the folder of markdown files

1 Like

I rewrote the action code to fix a bug and take advantage of the new built-in functions in 9.1.

$Page=$Text.extract("Page\s([0-9]+)");
$KindleLocation=$Text.extract("Location\s([0-9]+)");
var kindletype;
kindletype=$Text.extract("^Highlight|Note|Bookmark");
if(kindletype =="Highlight"){$Color=$Text.extract("Highlight\s?\((\w+)\)")};
$KindleType=kindletype;
$Prototype="Kindle"+ kindletype;
$Text=$Text.replace("Highlight.*?\n");
$Name=$Text.split("\.").at(0).replace("\n");

The previous ExplodeCode is broken in 9.1+ because type is now a built-in function. Also, something was going on with the calls to grep that would lock the machine for minutes.

4 Likes

Thanks for taking the time to share for fixed solution.

You are correct that there is now, from v9.0.0 a type() operator (see here).

You might also have missed that, if it helps to be able to enforce the type of a variable, from v9.1.0 you can stipulate a data type for a var (see here).

So vNum should be set to Number-type data:

var vNum = 3;

but this makes sure:

var:number vNum = 3;

The typing is var plus a colon plus the data type (must be in lowercase)

v9+ has added a number of new $Text manipulation operators and a suite of text stream parsing tools, all to try and aid those wrangling imported text into a desired form.

HTH

Anyone have a good answer for a Kobo? (Or, do I need to get a Kindle?)

I don’t have a Kobo e-reader myself, so take this with a grain of salt. After some googling, it’s seems possible to export from the physical device given some config modifications. I wasn’t able to export from iOS.