Skip to content

Instantly share code, notes, and snippets.

@macbookandrew
Last active January 11, 2017 16:32
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 macbookandrew/6de7fe01304061007e89 to your computer and use it in GitHub Desktop.
Save macbookandrew/6de7fe01304061007e89 to your computer and use it in GitHub Desktop.
Kindle Notes to HTML/Evernote

Copy/paste all the notes from kindle.amazon.com into a text file.

  • Find/replace regex \n with </p>\n<p>
    • Add a <p> at the top line of the file and a </p> at the end
  • Find/replace regex Read more at location ([0-9]+) with <br/>\n<a href="kindle://book?action=open&asin=***&location=$1">Read more at location $1</a></p> where *** is the book’s ASIN number
  • Find/replace regex • Delete this highlight</p>\n<p>Add a note</p> with nothing
  • Add <html><meta charset="UTF-8"/><body> at the top of the file and </body></html> at the bottom of the file, deleting anything extra at the top and bottom
    • If desired, add some simple styling, such as the following: <style>body {font-family: 'Helvetica Neue'; font-size: 14px;}</style>
  • Save the file with the .html extension
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment