1.0.4 • Published 2 years ago

kindle-hightlight-to-markdown v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

kindle-hightlight-to-markdown

Convert Your Kindle highlight & Note to Markdown/JSON

Install

Install with npm:

npm install kindle-hightlight-to-markdown

Usage

Using Greasemonkey script

// ==UserScript==
// @name        Kindle Hightlight to Markdown- amazon.co.jp
// @namespace   My highlight to markdown
// @match       https://read.amazon.co.jp/notebook
// @grant       GM_setClipboard
// @version     1.0
// @author      azu
// ==/UserScript==


const h1 = document.querySelector("h1.kp-notebook-title");
h1.addEventListener("click", async () => {
  const { parsePage, toMarkdown } = await import('https://cdn.skypack.dev/kindle-hightlight-to-markdown');
  const result = parsePage(window);
  console.log(result);
  const markdown = toMarkdown(result);
  console.log(markdown);
  GM_setClipboard(markdown);
});

Changelog

See Releases page.

Running tests

Install devDependencies and Run npm test:

npm test

Contributing

Pull requests and stars are always welcome.

For bugs and feature requests, please create an issue.

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

License

MIT © azu