This commit is contained in:
Kovid Goyal 2008-03-18 19:17:59 +00:00
parent 1c3a8e5571
commit cc4ca13393
2 changed files with 6 additions and 1 deletions

View File

@ -69,6 +69,8 @@ If you specify this option, any argument to %prog is ignored and a default recip
return p
def simple_progress_bar(percent, msg):
if isinstance(msg, unicode):
msg = msg.encode('utf-8', 'ignore')
if not msg:
print '%d%%'%(percent*100),
else:

View File

@ -575,6 +575,7 @@ class BasicNewsRecipe(object):
if dir is None:
dir = self.output_dir
mi = MetaInformation(self.title + time.strftime(self.timefmt), [__appname__])
mi.publisher = __appname__
mi.author_sort = __appname__
opf_path = os.path.join(dir, 'index.opf')
ncx_path = os.path.join(dir, 'index.ncx')
@ -743,7 +744,9 @@ class CustomIndexRecipe(BasicNewsRecipe):
raise NotImplementedError
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.create_manifest_from_files_in([self.output_dir])
mi.create_spine(['index.html'])