@sole/kindle-clippings-html-formatter

Formats Kindle clippings using HTML

Usage no npm install needed!

<script type="module">
  import soleKindleClippingsHtmlFormatter from 'https://cdn.skypack.dev/@sole/kindle-clippings-html-formatter';
</script>

README

kindle-clippings-html-formatter

A module to format the clippings from a Kindle device.

This module only formats clippings into HTML. The parsing is done in the kindle-clippings-parser module.

Shared for educational purposes. No support provided.

No Maintenance Intended

Installing

npm install @sole/kindle-clippings-html-formatter

Using

var fs = require('fs');
var parse = require('@sole/kindle-clippings-parser').parse;
var format = require('@sole/kindle-clippings-html-formatter');

var fileContents = fs.readFileSync('clippings.txt', 'utf-8');
var parsed = parse(fileContents);
var htmlOutput = format(parsed);

// done!
console.log(htmlOutput);

There's a working example in example/example.js.