mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Make the raw unique identifier field available
This commit is contained in:
parent
ffc4cadf39
commit
b1ddcfa7ee
@ -1103,7 +1103,7 @@ class OPF(object): # {{{
|
|||||||
yield item
|
yield item
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def unique_identifier(self):
|
def raw_unique_identifier(self):
|
||||||
uuid_elem = None
|
uuid_elem = None
|
||||||
for attr in self.root.attrib:
|
for attr in self.root.attrib:
|
||||||
if attr.endswith('unique-identifier'):
|
if attr.endswith('unique-identifier'):
|
||||||
@ -1115,7 +1115,13 @@ class OPF(object): # {{{
|
|||||||
for m in matches:
|
for m in matches:
|
||||||
raw = m.text
|
raw = m.text
|
||||||
if raw:
|
if raw:
|
||||||
return raw.rpartition(':')[-1]
|
return raw
|
||||||
|
|
||||||
|
@property
|
||||||
|
def unique_identifier(self):
|
||||||
|
raw = self.raw_unique_identifier
|
||||||
|
if raw:
|
||||||
|
return raw.rpartition(':')[-1]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def page_progression_direction(self):
|
def page_progression_direction(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user