richardpeng/Kindelabra — pull request #1 by palfrey (2011-10-08 17:07:12+00:00)
Title: Refactor library/UI

Thanks for writing Kindelabra. I tried using the kindle.py as a standalone library for doing things, and found out that a fair chunk of the logic was tied up in the Kindelabra frontend.

This patchset primarily pulls out those bits of functionality into the backend objects, and adds a few small bits of useful helpers into the backend to help with using it as standalone objects:

* Collection now has reasonable default values
* Rewrite add_asin/add_filehash as a unified add_ebook
* Move collection saving/loading collection into the Kindle object
* Allow for creating CollectionDB's without having to load an existing collection.
* Add initial "author" support to Ebook (only there for azw/mobi as I don't have any other items)
* Make document loading dump out the status as it loads as opposed to right at the end.

TODO
====
* del_file in Kindelabra could do with rewriting (as could possibly some of the other code) to not really need to know about ASINs v.s. filehashes for storage