Skip to content

Instantly share code, notes, and snippets.

@jdoleary
Created October 7, 2023 09:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdoleary/4cb1507cdcb545ded730cb9431470b2b to your computer and use it in GitHub Desktop.
Save jdoleary/4cb1507cdcb545ded730cb9431470b2b to your computer and use it in GitHub Desktop.
Extract kindle highlights and convert to markdown quote
// Kindle truncates long highlights in some views.
// To get full, un-truncated notes, go to https://read.amazon.com/kindle-library
// in the sidebar click on "Notes & Highlights
// To just get all the highlights in an array
Array.from(document.querySelectorAll('#highlight')).map(x => x.innerText)
// To get highlights as markdown
Array.from(document.querySelectorAll('#highlight')).map(x => (`> ${x.innerText}`)).join('\n\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment