kindle2notion icon indicating copy to clipboard operation
kindle2notion copied to clipboard

Add support for exported notes form Kindle app

Open mr2rm opened this issue 1 year ago • 0 comments

Hi,

First of all, thanks for your helpful package. I have a suggestion for a new feature and I'm interested in starting my contribution by working on it 😃

Is your feature request related to a problem? Please describe. Based on what is mentioned in the prerequisites, the package needs a connected Kindle device to access the highlights. This restriction stops you from using the package if you are using the Kindle app on a PC, mobile, or tablet. Also, even if you have a Kindle device, you have to connect it physically to a computer to synchronize your highlights with Notion.

Describe the solution you'd like The Kindle app has the feature to be synchronized with your Kindle device without any physical connection and you can export notes through the app. But the exported file is in HTML format and it can't be passed as the package argument.

Describe alternatives you've considered I was wondering if the package works based on a unified standard format (e.g. JSON, XML, or YAML), it makes it easier to develop different parsers and to be integrated with other apps (e.g. Kindle app). In my case, an HTML parser can be added to the package.

Additional context This is the sample of the exported file by the Kindle app in MacOS:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "XHTML1-s.dtd" >
<html xmlns="http://www.w3.org/TR/1999/REC-html-in-xml" xml:lang="en" lang="en">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta>
<style>
.bodyContainer {
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
    padding-left: 32px;
    padding-right: 32px;
}

.notebookFor {
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    color: rgb(119, 119, 119);
    margin: 24px 0px 0px;
    padding: 0px;
}

.bookTitle {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    color: #333333;
    margin-top: 22px;
    padding: 0px;
}

.authors {
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    color: rgb(119, 119, 119);
    margin-top: 22px;
    margin-bottom: 24px; 
    padding: 0px;
}

.sectionHeading {
    font-size: 24px;
    font-weight: 700;
    text-align: left;
    color: #333333;
    margin-top: 24px;
    padding: 0px;
}

.noteHeading {
    font-size: 18px;
    font-weight: 700;
    text-align: left;
    color: #333333;
    margin-top: 20px;
    padding: 0px;
}

.noteText {
    font-size: 18px;
    font-weight: 500;
    text-align: left;
    color: #333333;
    margin: 2px 0px 0px;
    padding: 0px;
}

.highlight_blue {
    color: rgb(178, 205, 251);
}

.highlight_orange {
    color: #ffd7ae;
}

.highlight_pink {
    color: rgb(255, 191, 206);
}

.highlight_yellow {
    color: rgb(247, 206, 0);
}

.notebookGraphic {
    margin-top: 10px;
    text-align: left;
}

.notebookGraphic img {
    -o-box-shadow:      0px 0px 5px #888;
    -icab-box-shadow:   0px 0px 5px #888;
    -khtml-box-shadow:  0px 0px 5px #888;
    -moz-box-shadow:    0px 0px 5px #888;
    -webkit-box-shadow: 0px 0px 5px #888;
    box-shadow:         0px 0px 5px #888; 
    max-width: 100%;
    height: auto;
}

hr {
    border: 0px none;
    height: 1px;
    background: none repeat scroll 0% 0% rgb(221, 221, 221);
}
</style>
</head>
<body>
<div class='bodyContainer'>
<h1><div class='notebookFor'>Notes and highlights for</div><div class='bookTitle'>BOOK TITLE
</div><div class='authors'>
AUTHOR
</div></h1><hr/>

<h2 class='sectionHeading'>CHAPTER NAME</h2>
<h3 class='noteHeading'>Highlight (<span class='highlight_yellow'>yellow</span>) - Location ?</div><div class='noteText'>NOTE 1</h3>
<h3 class='noteHeading'>Highlight (<span class='highlight_yellow'>yellow</span>) - Location ?</div><div class='noteText'>NOTE 2</h3>
<h3 class='noteHeading'>Highlight (<span class='highlight_yellow'>yellow</span>) - Location ?</div><div class='noteText'>NOTE 3</h3>
</div> 
</body> 
</html> 

mr2rm avatar Apr 15 '23 12:04 mr2rm