pyELib
A free open source system to create and manage collections of eBooks
...Dupes and different editions are properly handled. Each book is then automatically associated to one or more category (through machine learning) and, if desired, renamed.
The library is stored in a MySQL database and comes with an interface for easier management.