GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - AB1908/kindleHTML-to-markdown: Convert Kindle's HTML exports from the mobile app into usable Markdown

BranchesTags
Open more actions menu

Latest commit

 

History

5 Commits
5 Commits

Folders and files

NameName
Last commit message
Last commit date
LICENSE
LICENSE
 
 
README.md
README.md
 
 
kindle2md.py
kindle2md.py
 
 

Repository files navigation

Kindle HTML To Markdown

The Kindle Mobile app lets you export notes from your Kindle Notebook as an HTML file. However, this doesn't seem to be properly exported without having to pass your data through yet another third-party service like Readwise or Clippings.io. Most scripts I came across didn't quite export data properly nor did they attempt to parse the notes into a usable format, instead opting to make a near 1-to-1 conversion. Because of the strange export format, passing it through pandoc doesn't seem to be of any use either. Hence, the custom script.

Dependencies

  • Python
    • beautifulsoup4

Usage

Run using

python -m kindle2md path/to/export.html

Example

In:

<div class="noteHeading">
Highlight (<span class="highlight_pink">pink</span>) - PREFACE TO THE CHARLES DICKENS EDITION >  Location 103
</div>
<div class="noteText">
So true are these avowals at the present day, that I can now only take the reader into one confidence more. Of all my books, I like this the best. It will be easily believed that I am a fond parent to every child of my fancy, and that no one can ever love that family as dearly as I love them. But, like many fond parents, I have in my heart of hearts a favourite child. And his name is DAVID COPPERFIELD.
</div>
<div class="noteHeading">
Note - PREFACE TO THE CHARLES DICKENS EDITION >  Location 103
</div>
<div class="noteText">
This is a sample note and highlight from the 1869 Charles Dickens Edition of David Copperfield that is freely available on Gutenberg.
</div>

Out:

## PREFACE TO THE CHARLES DICKENS EDITION

:::pink

> So true are these avowals at the present day, that I can now only take the reader into one confidence more. Of all my books, I like this the best. It will be easily believed that I am a fond parent to every child of my fancy, and that no one can ever love that family as dearly as I love them. But, like many fond parents, I have in my heart of hearts a favourite child. And his name is DAVID COPPERFIELD.

This is a sample note and highlight from the 1869 Charles Dickens Edition of David Copperfield that is freely available on Gutenberg.

:::

About

Convert Kindle's HTML exports from the mobile app into usable Markdown

ab1908.github.io/2022/02/08/kindle-exports.html

Topics

exportkindlekindle-datakindle-exportkindle-highlightskindle-notesmarkdown

Resources

Readme
GPL-3.0 license
Activity

Stars

3 stars

Watchers

1 watching

Forks

2 forks
Report repository

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.