mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-04 05:04:48 +01:00
Fix #1442 (html2epub creates enormous .opf)
This commit is contained in:
parent
fb008667e5
commit
0b80001ef0
1 changed files with 3 additions and 3 deletions
|
|
@ -16,7 +16,7 @@ def get_metadata(stream):
|
|||
|
||||
# Title
|
||||
title = None
|
||||
pat = re.compile(r'<!--.*?TITLE=(?P<q>[\'"])(.+)(?P=q).*?-->', re.DOTALL)
|
||||
pat = re.compile(r'<!--.*?TITLE=(?P<q>[\'"])(.+?)(?P=q).*?-->', re.DOTALL)
|
||||
match = pat.search(src)
|
||||
if match:
|
||||
title = match.group(2)
|
||||
|
|
@ -28,7 +28,7 @@ def get_metadata(stream):
|
|||
|
||||
# Author
|
||||
author = None
|
||||
pat = re.compile(r'<!--.*?AUTHOR=(?P<q>[\'"])(.+)(?P=q).*?-->', re.DOTALL)
|
||||
pat = re.compile(r'<!--.*?AUTHOR=(?P<q>[\'"])(.+?)(?P=q).*?-->', re.DOTALL)
|
||||
match = pat.search(src)
|
||||
if match:
|
||||
author = match.group(2).replace(',', ';')
|
||||
|
|
@ -36,7 +36,7 @@ def get_metadata(stream):
|
|||
mi = MetaInformation(title, [author] if author else None)
|
||||
|
||||
# Publisher
|
||||
pat = re.compile(r'<!--.*?PUBLISHER=(?P<q>[\'"])(.+)(?P=q).*?-->', re.DOTALL)
|
||||
pat = re.compile(r'<!--.*?PUBLISHER=(?P<q>[\'"])(.+?)(?P=q).*?-->', re.DOTALL)
|
||||
match = pat.search(src)
|
||||
if match:
|
||||
mi.publisher = match.group(2)
|
||||
|
|
|
|||
Loading…
Reference in a new issue