mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #226
This commit is contained in:
parent
16d1518d19
commit
8414c4e295
@ -1500,8 +1500,16 @@ def process_file(path, options, logger=None):
|
|||||||
|
|
||||||
if not options.title:
|
if not options.title:
|
||||||
options.title = default_title
|
options.title = default_title
|
||||||
|
|
||||||
|
for prop in ('author', 'author_sort', 'title', 'title_sort', 'publisher', 'freetext'):
|
||||||
|
val = getattr(options, prop)
|
||||||
|
if val and not isinstance(val, unicode):
|
||||||
|
soup = BeautifulSoup(val)
|
||||||
|
setattr(options, prop, unicode(soup))
|
||||||
|
|
||||||
title = (options.title, options.title_sort)
|
title = (options.title, options.title_sort)
|
||||||
author = (options.author, options.author_sort)
|
author = (options.author, options.author_sort)
|
||||||
|
|
||||||
args = dict(font_delta=options.font_delta, title=title, \
|
args = dict(font_delta=options.font_delta, title=title, \
|
||||||
author=author, sourceencoding='utf8',\
|
author=author, sourceencoding='utf8',\
|
||||||
freetext=options.freetext, category=options.category,
|
freetext=options.freetext, category=options.category,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user