Zitat: Kindle clipping converter
I have had a Kindle 3 for a couple of years now. I am strictly against DRM (Digital Restrictions Management) and therefore refuse to buy locked ebooks, but I have made very good use of my device to read free (as in ‘free speech’, not necessarily as in ‘free beer’) ebooks, as well as documents generated by the excellent Calibre tool, which everyone who owns an ebook reader should know and use.
The Kindle allows users to highlight passages and to add notes to ebooks. All these highlights and notes are stored (along with other information) in the ‘My Clippings.txt’ file, under the ‘documents’ directory. In order to organize this information, I have written Zitat (German for ‘quote’): a simple Python script to import the contents of this file, categorize and sort the clippings and export the result to a text file in emacs org-mode format (but which can also be read by any text editor). Here’s a screenshot:
Here’s how to install and run Zitat:
- You must have Python 2.7 installed. If you don’t have it, get it here.
- Download the zitat.py script and save it anywhere.
- Run the script in a command shell. You can provide the name of the input file as the first command-line argument, and the name of the output file as the second command-line argument. If any of these arguments is missing, the script will ask you for the filename(s). Note that there is no GUI. You must interact with the script in a shell.
- If no error messages appear, the output file will contain all clippings, notes and highlights, sorted by author, then by title, then by type, then by location.
- If you open the output file in emacs, in org-mode, you can navigate the information using all of org-mode’s features.
Please contact me if you’d like to file bug reports, ask for features or make suggestions. Feel free to get the code and alter it in any way you want, as long as you respect version 3 of the GPL.