Originally Posted by nynaevelan
I've tried running this but it does not seem to be working to put the books into collections. Perhaps I am misunderstanding something. If I put new books on the kindle, then run the kindle collections plugin, then run your script and reboot. Shouldn't it put the new books into the collections based on what the kindles plugin did?
This is exactly what should happen. I've noticed that every time a new book gets added to cc.db, indexing and who knows what else kicks off. I've noticed that if I import the collections.json from calibre into cc.db before the cpu settles down, some of the books don't show up as in collections. I just re-run the import and all is dandy.
Also, if you're not storing your calibre content in documents/calibre, the script will skip those collections.
Just to prove what a masochist I am, I deleted my cc.db file. A zero length file was immediately created and it took a *long* time before all the content was re-added and re-indexed. When the indexing was done, I ran the export/calibre/import and got all my collections back.
Since stdout and stderr go to /dev/null it's hard to determine what's going wrong. The best bet is to ssh into the Kindle and run json2db.sh -v to see the output.