# safari-books-csv-to-json

> Converts an email attachment consisting of an O'Reilly Safari Books CSV highlights export into a JSON object

Latest version **1.1.3** (published 2022-12-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install safari-books-csv-to-json
pnpm add safari-books-csv-to-json
yarn add safari-books-csv-to-json
bun add safari-books-csv-to-json
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2022-12-27 |
| First published | 2018-12-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 217 |
| Author | Sawyer Hollenshead |
| Maintainers | sawyerh |

## Links

- npm: https://www.npmjs.com/package/safari-books-csv-to-json
- Repository: https://github.com/sawyerh/highlights
- Homepage: https://github.com/sawyerh/highlights#readme
- Issues: https://github.com/sawyerh/highlights/issues
- npm.io page: https://npm.io/package/safari-books-csv-to-json

## Dependencies (2)

- [csvtojson](https://npm.io/package/csvtojson.md) ^2.0.8
- [mailparser](https://npm.io/package/mailparser.md) ^3.6.2

## Recent versions

- 1.1.3 (latest) — 2022-12-27
- 1.1.2 — 2022-12-26
- 1.1.1 — 2019-05-26
- 1.1.0 — 2018-12-01
- 1.0.0 — 2018-12-01

## README

Converts an email attachment consisting of an O'Reilly Safari Books CSV highlights export into a JSON object

## Installation

```
npm install safari-books-csv-to-json --save
```

## How to retrieve an export of your Safari Books highlights

1. Navigate to the "Highlights" page on [safaribooksonline.com](https://www.safaribooksonline.com)
2. Select the book you want to export
3. Select "Export all notes and highlights"

## API

## toJSON(source) ⇒ <code>Promise.&lt;Object&gt;</code>

Convert a Safari Books CSV highlights export into a JSON object.
Rejects if the source isn't a valid Safari Books CSV export. The email is
expected to contain at least one CSV attachment.

| Param  | Type                                                              |
| ------ | ----------------------------------------------------------------- |
| source | <code>Buffer</code> \| <code>Stream</code> \| <code>String</code> |

## Example

```js
const toJSON = require("safari-books-csv-to-json");
const email = readFile(emailPath);

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

---
_Source: https://npm.io/package/safari-books-csv-to-json · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
