View Single Post
Old 11-05-2014, 12:00 PM   #1
EnergyLens
Hack
EnergyLens began at the beginning.
 
Posts: 34
Karma: 12
Join Date: Dec 2009
Device: Kobo Aura HD, Kindle Paperwhite
Annotations: Capture/Convert Kobo-Kindle (uses OpenWith and Annotations Plugins)

When I started using both a Kobo and a Kindle I still wanted to be able to upload my Annotations to Clippings.io for sorting and tagging...

This python script can be run using the Calibre OpenWith Plugin. It is dependent on Annotations having been imported into a Calibre column by the Annotations Plugin.

By default this script searches first for an Annotations column, and failing that for Annotations in the Comments column. It can be configured for any column.

By default the script will, when run from within Calibre, generate a .clip file and insert it into the Calibre database. You can change it to any extension, but I chose clip so that I didn't have conflicts with other .txt files.

If you stick with the .clip extension you just need to have your OS associate the file extension with your favorite text editor.

There are settings in the script such that you can have it write all exported annotations to a directory of your choice and not update the Calibre database at all. This is what I do when I am converting Kobo annotations for uploading to Clippings.io

Also, if you run the script from the command line in the directory where your Calibre database is located, it will export all Annotations found in the database.

~~~~~~~~~

In the future I plan to establish an Annotations database that is independent from the Calibre database because I find that with the volatility of news downloads there is the danger of Highlighted Content being lost.

There is the possibility that a Kindle's MyClippings.txt could be recreated from exported Annotations such that when books are removed from a Kindle and then copied back to a Kindle, the annotations could be restored (If the MyClippings.txt file is corrupted or deleted).

~~~~~~~~~

I also noticed a question from turelur about storing annotations within ebook files. I'm going to think about this some more, but off the top of my head I would save an ORIGINAL_EPUB, then generate an EPUB with Annotations from a the .clip file I'm currently generating (or in the future a database) and then use something like EPUB MERGE...
Attached Files
File Type: zip annotations.py.zip (3.1 KB, 682 views)

Last edited by EnergyLens; 11-05-2014 at 01:06 PM. Reason: fixed spelling errors
EnergyLens is offline   Reply With Quote