polyglot.markdown.kindle_notebook (class) ∞
-
class
polyglot.markdown.
kindle_notebook
(log, kindleExportPath, outputPath)[source] ∞ convert the HTML export of kindle notebooks (from kindle apps) to markdown
- Key Arguments:
log
– loggerkindleExportPath
– path to the exported kindle HTML fileoutputPath
– the output path to the md file.
Usage:
To convert the exported HTML file of annotation and notes from a kindle book or document to markdown, run the code:
from polyglot.markdown import kindle_notebook nb = kindle_notebook( log=log, kindleExportPath="/path/to/kindle_export.html", outputPath="/path/to/coverted_annotations.md" ) nb.convert()
The colours of the annotations convert to markdown attributes via the following key:
Methods
__init__
(log, kindleExportPath, outputPath)clean
(text)convert
()convert the kindle_notebook object convertToMD
(kindleNote)find_component
(divtag, annotations)