Skip to main content

Amazon Kindle clippings parser

Project description

Clippings

Python module to manipulate Amazon Kindle clippings files.

It allows you to:

  • Parse your existing clippings file into a structured representation;
  • Generate clippings file programmatically.

Latest version released on PyPI Build status

Installation

pip install clippings

Usage

Command-line Usage

# Parse a clippings file
clippings -o json ./clippings.txt

# or from stdin:
cat clippings.txt | clippings -

Programmatic Usage

from clippings import parse_clippings

my_clippings_file = ...
parse_clippings(my_clippings_file)

Want to parse non-English clippings?

Here's a highlight clipping taken from a Kindle that speaks Spanish::

El Principe de la Niebla (Carlos Ruiz Zafón)
- La subrayado en la página 4 | posición 60-60 | Añadido el miércoles, 6 de julio de 2022 06:54:57

asintiendo a una pregunta que Max no había llegado a formular.

parse_clippings won't parse this by default but you can write your own parser for the second line and pass it to the parameter metadata_parser.

You can take a look at an example here.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clippings-0.9.0.tar.gz (5.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page