mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1098325 (calibredb catalog field isbn dropping 'X' on export)
This commit is contained in:
commit
4cac5c5c00
@ -133,8 +133,8 @@ class CSV_XML(CatalogPlugin):
|
|||||||
elif field in ['authors', 'tags']:
|
elif field in ['authors', 'tags']:
|
||||||
item = ', '.join(item)
|
item = ', '.join(item)
|
||||||
elif field == 'isbn':
|
elif field == 'isbn':
|
||||||
# Could be 9, 10 or 13 digits
|
# Could be 9, 10 or 13 digits, with hyphens, possibly ending in 'X'
|
||||||
item = u'%s' % re.sub(r'[\D]', '', item)
|
item = u'%s' % re.sub(r'[^\dX-]', '', item)
|
||||||
elif field in ['pubdate', 'timestamp']:
|
elif field in ['pubdate', 'timestamp']:
|
||||||
item = isoformat(item)
|
item = isoformat(item)
|
||||||
elif field == 'comments':
|
elif field == 'comments':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user