mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Use random UUIDs as book id
This commit is contained in:
parent
5599164fef
commit
2d8b5b80bf
@ -19,6 +19,7 @@ The LRF file format is documented at U{http://www.sven.de/librie/Librie/LrfForma
|
|||||||
import sys, os
|
import sys, os
|
||||||
from optparse import OptionParser, OptionValueError
|
from optparse import OptionParser, OptionValueError
|
||||||
from htmlentitydefs import name2codepoint
|
from htmlentitydefs import name2codepoint
|
||||||
|
from uuid import uuid4
|
||||||
|
|
||||||
from ttfquery import describe, findsystem
|
from ttfquery import describe, findsystem
|
||||||
from fontTools.ttLib import TTLibError
|
from fontTools.ttLib import TTLibError
|
||||||
@ -283,6 +284,7 @@ def Book(options, logger, font_delta=0, header=None,
|
|||||||
book = _Book(textstyledefault=tsd,
|
book = _Book(textstyledefault=tsd,
|
||||||
pagestyledefault=ps,
|
pagestyledefault=ps,
|
||||||
blockstyledefault=dict(blockwidth=ps['textwidth']),
|
blockstyledefault=dict(blockwidth=ps['textwidth']),
|
||||||
|
bookid=uuid4().hex,
|
||||||
**settings)
|
**settings)
|
||||||
for family in fonts.keys():
|
for family in fonts.keys():
|
||||||
if fonts[family]:
|
if fonts[family]:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user