View Single Post
Old 12-20-2011, 05:41 PM   #10
sumpin
Enthusiast
sumpin is a splendid one to beholdsumpin is a splendid one to beholdsumpin is a splendid one to beholdsumpin is a splendid one to beholdsumpin is a splendid one to beholdsumpin is a splendid one to beholdsumpin is a splendid one to beholdsumpin is a splendid one to beholdsumpin is a splendid one to beholdsumpin is a splendid one to beholdsumpin is a splendid one to behold
 
Posts: 29
Karma: 19952
Join Date: Sep 2011
Location: USA & UK
Device: down to just a PW4
I wrote the attached script to add the content of my collections.json file produced by the kindle collections calibre plug-in to the collections database cc.db on the kindle touch.
Since I've jailbroken my kindle and modified iptables, I scp the json file from /mnt/us/system on my kindle touch (put there by calaibre) to my unix box, run the foo script, and then scp the cc.db file back. (I made /var/local/cc.db a symbolic link to /mnt/us/system/cc.db.) If I knew how to cross-compile libfoo.so, I suppose it could easily be run on the KT itself.
I finally have my Kindle Touch as usable/useful as my Kindle Keyboard!
I will name my next cat Yifan. Thankyouthankyouthankyou!!!

EDIT: I added better error handling/reporting and command line arguments to the script in the course of getting it to work on mac os lion as well.

One important(!) thing I forgot to mention is that it relies on storing calibre managed content in documents/calibre on the Kindle.
(I have my "Sending books to devices" settings to:
"calibre/{author_sort}/{series:|| - }{series_index:0>2s|| - }{title_sort}".)
I you don't like this, you can remove the 'and p_location like "%/calibre/&" from the sql.
Attached Files
File Type: gz foo.tar.gz (3.1 KB, 526 views)

Last edited by sumpin; 01-06-2012 at 01:16 PM. Reason: Add better error handling to script
sumpin is offline   Reply With Quote