Skip to content

Instantly share code, notes, and snippets.

View jrswab's full-sized avatar

Jaron Swab jrswab

View GitHub Profile
@jrswab
jrswab / extract-kindle-notes.js
Created April 27, 2022 02:42
Extract notes (not highlights) from `https://read.amazon.com/notebook`
// Loop over every "note" in the notebook
// Each book is it's own notebook.
// Highlights are considered notes at this level.
for(let i = 0; i < document.getElementsByClassName("kp-notebook-note").length; i++) {
// An id of 5 is a placeholder for when a user adds a note.
// Every note and highlight has at least this many characters in the ID.
if (notes[i].id.length > 5) {
console.log(notes[i].childNodes[1].innerHTML)
}
}

Keybase proof

I hereby claim:

  • I am jrswab on github.
  • I am jrswab (https://keybase.io/jrswab) on keybase.
  • I have a public key ASDDqDzJspTD9XxgDmoZkjrgaizgWaE3e6vVeUBaHtidxAo

To claim this, I am signing this object: