1.1.3 • Published 9 months ago

highlights-email-to-json v1.1.3

Weekly downloads
1
License
MIT
Repository
github
Last release
9 months ago

Convert an email export of notes into a JSON object. This is handy for saving notes from Instapaper or directly from the web.

Installation

npm install highlights-email-to-json --save

Expected email format

The email you send must match the following format in order to be converted by this package.

---
title: Book Title
authors: Author Name; Another author name
---
Note one text.


Note two text.

Note: The front-matter section at the top will accept any attribute.

API

toJSON(email) ⇒ Promise.<Object>

Convert a notes email export into a JSON object. Rejects if the mail isn't a valid notes export.

ParamType
emailBuffer | Stream | String

Example

const toJSON = require("highlights-email-to-json");
const email = readFile(emailPath);

toJSON(email).then((data) => {
	console.log(data);
});
1.1.3

9 months ago

1.1.1

1 year ago

1.1.2

1 year ago

1.1.0

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago