View Single Post
Old 08-22-2014, 07:25 PM   #1
barsanuphe
Connoisseur
barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.
 
Posts: 77
Karma: 40008
Join Date: Aug 2014
Location: Paris, France
Device: PW2, Kobo H20, Kobo Aura One
LibrarianSync: Kindle collections builder

What it is.

LibrarianSync is a Kindle collection builder, originally meant as a complement to Librarian, but which can be used completely independently.

It has been tested on a Kindle PW2 (EU, Wi-Fi) FW 5.4.5.1, and on a Touch FW 5.3. It probably works on other K5 devices. It apparently works on the Voyage as well.

It can use as a source:
  • a json file in native format (such as generated by Librarian when syncing, see below)
  • the json file automatically generated by the Calibre Kindle Collections plugin)
  • the folder structure inside the documents/ folder.

Using the json file, the entries can either remplace all existing collections or update existing collections. Using folder structure, all previously existing collections are dropped.

The native json format looks as follows:

Code:
{
  "library/Alexandre Dumas/Alexandre Dumas (2004) Les Trois Mousquetaires.mobi": ["gutenberg","french","not read"],
  "library/Alexandre Dumas/Alexandre Dumas (2011) Le Comte De Monte-Cristo.mobi": ["gutenberg","french","most awesome book ever"],
  "re:Alexandre Dumas (Père|Fils)": ["dumas"]
}
As shown in the last line, you can add (python) regular expressions instead of filenames (with a re: prefix); all matches will be added to the associated collection.

What is needed.

LibrarianSync comes as a KUAL menu entry. As such, it requires: a jailbroken PW2, MKK, KUAL, and python (snapshot > 0.10N-r10867).

For more information, see the README file on github.

Where it is.

The code resides on github, but since I do not use this personally anymore, the better place to look for changes is NiLuJe's fork (thanks!).
See attachments for an up to date Kindle package.

Note: the code has moved to a separate repository as LibrarianSync has become something useful in its own right. Please update your git remotes to the new repository.

Where it comes from.

LibrarianSync is inspired by this thread.

Thanks to NiLuJe for all the contributions and continuous support, and kaznelson for his initial courageous sqlite investigations.

Feedback is very much welcome.

LibrarianSync Changelog

v20201109 - Same as below . -- NiLuJe
v20190103 - Refreshed package from latest sources, so as not to leave four year old packages around... -- NiLuJe
v1.10 - fixed when getting a null cdetype, added Voyage support.
v1.9 - fixed support of non-cloud aware devices
v1.8 - fixed collection appearing twice in FW 5.6
v1.7 - added support for regular expressions in librarian json when building collections with LibrarianSync.
v1.6 - fixed exporting collections, added downloading ebooks hosted over http by librarian.
v1.5 - package available for all k5 models.
v1.4 - updating collections is now faster.
v1.3 - calibre plugin json support & ability to export current collections (librarian and calibre plugin versions). While running the script, current operation now logged and displayed.
v1.2 - experimental calibre plugin json support & ability to export current collections to extensions/exported_collections.json.
v1.1 - experimental calibre plugin json support
v1.0 - original version
Attached Thumbnails
Click image for larger version

Name:	librariansync_v1.6.png
Views:	8472
Size:	21.8 KB
ID:	128575  
Attached Files
File Type: gz librariansync-1.0.tar.gz (7.0 KB, 1985 views)
File Type: gz librariansync-1.1.tar.gz (7.4 KB, 1523 views)
File Type: gz librariansync-1.2.tar.gz (8.0 KB, 1552 views)
File Type: gz librariansync-1.3.tar.gz (10.6 KB, 1652 views)
File Type: gz librariansync-1.4.tar.gz (10.9 KB, 1656 views)
File Type: gz librariansync-1.5.tar.gz (11.4 KB, 1618 views)
File Type: gz librariansync-1.6.tar.gz (12.4 KB, 1636 views)
File Type: gz librariansync-1.7.tar.gz (12.7 KB, 2012 views)
File Type: gz librariansync-1.8.tar.gz (12.7 KB, 1664 views)
File Type: gz librariansync-1.9.tar.gz (12.7 KB, 1880 views)
File Type: gz librariansync-1.10.tar.gz (13.3 KB, 5823 views)
File Type: gz librariansync-20190103.tar.gz (13.8 KB, 1849 views)
File Type: gz librariansync-20201109.tar.gz (14.0 KB, 1428 views)

Last edited by barsanuphe; 11-21-2021 at 07:22 PM. Reason: added link to the active fork
barsanuphe is offline   Reply With Quote