mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
This commit is contained in:
parent
1c3a8e5571
commit
cc4ca13393
@ -69,6 +69,8 @@ If you specify this option, any argument to %prog is ignored and a default recip
|
|||||||
return p
|
return p
|
||||||
|
|
||||||
def simple_progress_bar(percent, msg):
|
def simple_progress_bar(percent, msg):
|
||||||
|
if isinstance(msg, unicode):
|
||||||
|
msg = msg.encode('utf-8', 'ignore')
|
||||||
if not msg:
|
if not msg:
|
||||||
print '%d%%'%(percent*100),
|
print '%d%%'%(percent*100),
|
||||||
else:
|
else:
|
||||||
|
@ -575,6 +575,7 @@ class BasicNewsRecipe(object):
|
|||||||
if dir is None:
|
if dir is None:
|
||||||
dir = self.output_dir
|
dir = self.output_dir
|
||||||
mi = MetaInformation(self.title + time.strftime(self.timefmt), [__appname__])
|
mi = MetaInformation(self.title + time.strftime(self.timefmt), [__appname__])
|
||||||
|
mi.publisher = __appname__
|
||||||
mi.author_sort = __appname__
|
mi.author_sort = __appname__
|
||||||
opf_path = os.path.join(dir, 'index.opf')
|
opf_path = os.path.join(dir, 'index.opf')
|
||||||
ncx_path = os.path.join(dir, 'index.ncx')
|
ncx_path = os.path.join(dir, 'index.ncx')
|
||||||
@ -743,7 +744,9 @@ class CustomIndexRecipe(BasicNewsRecipe):
|
|||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
def create_opf(self):
|
def create_opf(self):
|
||||||
mi = MetaInformation(self.title, [__appname__])
|
mi = MetaInformation(self.title + time.strftime(self.timefmt), [__appname__])
|
||||||
|
mi.publisher = __appname__
|
||||||
|
mi.author_sort = __appname__
|
||||||
mi = OPFCreator(self.output_dir, mi)
|
mi = OPFCreator(self.output_dir, mi)
|
||||||
mi.create_manifest_from_files_in([self.output_dir])
|
mi.create_manifest_from_files_in([self.output_dir])
|
||||||
mi.create_spine(['index.html'])
|
mi.create_spine(['index.html'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user