Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/grassdog/klipbook

Convert highlights and notes on your Kindle to nice HTML, Markdown, or JSON.
https://github.com/grassdog/klipbook

Last synced: 4 days ago
JSON representation

Convert highlights and notes on your Kindle to nice HTML, Markdown, or JSON.

Awesome Lists containing this project

README

        

# Klipbook

[![Build Status](https://travis-ci.org/grassdog/klipbook.png)](https://travis-ci.org/grassdog/klipbook)

Klipbook takes the highlights and notes that you've created on your Kindle and
outputs them into nice HTML, Markdown, or JSON.

## An example of a HTML clippings file generated by Klipbook

Example
<br />of a clippings file

## What sources does it support?

Klipbook can take your highlights from a clippings file off a physical Kindle device.

## How does it work?

Klipbook supports two commands: `list` and `export`.

`list` shows the books in the specified source and `export` exports books to a different format.

## Specifying an Input Source

Both commands require you to specify the source of your clippings.

### Reading from a clippings file

Copy your clippings file (called "My Clippings.txt" on a 3rd generation Kindle) from your Kindle device to your local drive via USB.

Then specify the path to your clippings via:

```sh
$ klipbook list --from-file "My Clippings.txt"
```

## List

The `list` command lists the books available in the specified source.

```sh
$ klipbook list --from-file "My Clippings.txt"

Book list:
[1] The Big Sleep by Raymond Chandler
[2] How to jump out of a plane without a parachute and survive by Rip Rockjaw
```

By default it will only list the latest book. This can be overrided with the `--count` switch.

## Export

`export` reads the clippings from your source and writes them out in the specified format.

You can specify the directory to export into with the `--output-dir` switch. This defaults to the current directory.

You can also specify a maximum number of books you'd like exported with the `--count` switch.

Klipbook will not overwrite an exiting file by default. You can change this with the `--force` flag.

### Export to Html

You can export clippings into a pretty html file for each book.

```sh
$ klipbook export --from-file "My Clippings.txt" --format html
```

### Export to JSON

You can export clippings into a JSON file for each book.

```sh
$ klipbook export --from-file "My Clippings.txt" --format json
```

### Export to Markdown

You can export clippings into a markdown file for each book.

```sh
$ klipbook export --from-file "My Clippings.txt" --format markdown
```

## Set defaults

You can set your defaults in the klipbook rc file: `~/.klipbookrc`.

This is a YAML file and you can specify default values for the source and the output directory (note the use of snake case) e.g.

```sh
$ cat ~/.klipbookrc

:output_dir: /path/to/my/default/output/directory
```

Command line options override the defaults stored in the rc file.

## Installation

Klipbook is a Ruby gem. To install simply run:

```sh
$ gem install klipbook
```

## Supported Devices

Klipbook has been tested on clippings files from 3rd generation Kindles and the Kindle Touch.

## Tested platforms

Klipbook has been tested on Mac OS High Sierra using Ruby 2.5.1.

## Contributing to Klipbook

Fork the project on [Github](https://github.com/grassdog/klipbook), add tests for your changes, and submit a well described pull request.

## Copyright

Copyright (c) 2018 Ray Grasso. See LICENSE.txt for further details.