Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

This is yet another Python library to parse the "My Clippings.txt" files generated by the Amazon Kindle.

The name "gannet" is inspired by the Monty Python "Bookshop" sketch.

In the hopes of making a more flexible and understandable parser, this one makes use of the Pyparsing library for parsing the various parts of a "My Clippings.txt" file.

Installing

pip install -r requirements.txt

Using

from gannet import parse_my_clippings
import codecs

clippings = []
with codecs.open(sys.argv[1], 'r', 'utf-8') as f:
    clippings = parse_my_clippings(f)

To convert a "My Clippings.txt" file to JSON

$ python clippings-to-json.py "My Clippings.txt" 

Testing

$ nosetests

About

A Python parser for the Amazon Kindle "My Clippings.txt" file

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages