mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'patch-2' of https://github.com/felagund/calibre
This commit is contained in:
commit
13db00d50c
@ -1457,16 +1457,18 @@ class BasicNewsRecipe(Recipe):
|
|||||||
def publication_date(self):
|
def publication_date(self):
|
||||||
'''
|
'''
|
||||||
Use this method to set the date when this issue was published.
|
Use this method to set the date when this issue was published.
|
||||||
Defaults to the moment of download.
|
Defaults to the moment of download. Must return a :class:`datetime.datetime`
|
||||||
'''
|
object.
|
||||||
|
'''
|
||||||
return nowf()
|
return nowf()
|
||||||
|
|
||||||
def create_opf(self, feeds, dir=None):
|
def create_opf(self, feeds, dir=None):
|
||||||
if dir is None:
|
if dir is None:
|
||||||
dir = self.output_dir
|
dir = self.output_dir
|
||||||
title = self.short_title()
|
title = self.short_title()
|
||||||
|
pdate = self.publication_date()
|
||||||
if self.output_profile.periodical_date_in_title:
|
if self.output_profile.periodical_date_in_title:
|
||||||
title += strftime(self.timefmt)
|
title += strftime(self.timefmt, pdate)
|
||||||
mi = MetaInformation(title, [__appname__])
|
mi = MetaInformation(title, [__appname__])
|
||||||
mi.publisher = __appname__
|
mi.publisher = __appname__
|
||||||
mi.author_sort = __appname__
|
mi.author_sort = __appname__
|
||||||
@ -1489,7 +1491,7 @@ class BasicNewsRecipe(Recipe):
|
|||||||
language = canonicalize_lang(self.language)
|
language = canonicalize_lang(self.language)
|
||||||
if language is not None:
|
if language is not None:
|
||||||
mi.language = language
|
mi.language = language
|
||||||
mi.pubdate = self.publication_date()
|
mi.pubdate = pdate
|
||||||
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')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user