View Single Post
Old 03-27-2009, 02:39 PM   #29
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,475
Karma: 27757440
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by Hadrien View Post
Low probability of collision is actually much better than incrementing an id starting with 1 anyway...
I think we're talking past each other here. There are two issues:

1) The philosophical issue of whether trying to assign a unique id to electronic documents is meaningful. On this I strongly believe it is not. A consequence of that is that I believe a statement like "producing books with non unique ids is catastrophic" is just wrong.

2) The practical issue of what id to assign to an EPUB book. In calibre there are two approaches used:

a) If you convert using the GUI. calibre assigns the id of the book in the database. The idea being that these books are meant to be part of your personal collection. In such a context an uniquely incremented number is actually *more* unique than a UUID.
b) If you convert via the command line it uses a UUID.

Now where a bulk conversion service like PG are concerned, it is behavior b) tht is important and there calibre produces a UUID.



Quote:
You can use such an identifier if you like, but don't assign it to the package identifier.
Again, when converted via the commandline the package identifier produced by calibre is a UUID
kovidgoyal is offline   Reply With Quote