A react component to parse and display kindle notes
npm install --save react-kindle-clippings
To use the KindleClippings React component in your own React app/web page, follow the steps below
import React, { Component } from 'react'
import KindleClippings from 'react-kindle-clippings'
class Example extends Component {
render() {
return <KindleClippings url="[URL to fetch kindleclippings.txt from]" />
}
}
You can find your Kindle notes and highlights when you connect your kindle to your computer. Your highlights are saved in a file named "My Clippings.txt" in the root folder of the mounted path of your kindle.
Copy this file, and save it as "KindleClippings.txt" to a public URL which you will pass into this React component as a property
I followed the instructions here [[https://dev.to/ramonak/how-to-publish-a-custom-react-component-to-npm-using-create-react-library-4bhi]] and used the following to bootstrap the project:
npx create-react-library [my project name]
This sets up everything needed to publish to NPM, and all I had to in the end was to simply run
npm publish
MIT © thisisrajiraj