News download: When downloading news for the Kindle, do not add date to the title, to allow the Kindle's periodical archiving to work. Fixes #6411 (Make date in new title configurable from GUI)

This commit is contained in:
Kovid Goyal 2010-08-06 09:49:34 -06:00
parent 852ff2e6de
commit 08e994dc45
3 changed files with 15 additions and 8 deletions

View File

@ -233,18 +233,20 @@ class OutputProfile(Plugin):
'if you want to produce a document intended to be read at a '
'computer or on a range of devices.')
# The image size for comics
#: The image size for comics
comic_screen_size = (584, 754)
# If True the MOBI renderer on the device supports MOBI indexing
#: If True the MOBI renderer on the device supports MOBI indexing
supports_mobi_indexing = False
# If True output should be optimized for a touchscreen interface
#: If True output should be optimized for a touchscreen interface
touchscreen = False
touchscreen_news_css = ''
# A list of extra (beyond CSS 2.1) modules supported by the device
# Format is a cssutils profile dictionary (see iPad for example)
#: A list of extra (beyond CSS 2.1) modules supported by the device
#: Format is a cssutils profile dictionary (see iPad for example)
extra_css_modules = []
#: If True, the date is appended to the title of downloaded news
periodical_date_in_title = True
@classmethod
def tags_to_string(cls, tags):
@ -550,6 +552,7 @@ class KindleOutput(OutputProfile):
fbase = 16
fsizes = [12, 12, 14, 16, 18, 20, 22, 24]
supports_mobi_indexing = True
periodical_date_in_title = False
@classmethod
def tags_to_string(cls, tags):
@ -567,6 +570,7 @@ class KindleDXOutput(OutputProfile):
dpi = 150.0
comic_screen_size = (741, 1022)
supports_mobi_indexing = True
periodical_date_in_title = False
@classmethod
def tags_to_string(cls, tags):

View File

@ -166,9 +166,9 @@ class iPhone(Device):
class Android(Device):
name = 'Adroid phone + WordPlayer'
name = 'Adroid phone + WordPlayer/Aldiko'
output_format = 'EPUB'
manufacturer = 'Google/HTC'
manufacturer = 'Android'
id = 'android'
class HanlinV3(Device):

View File

@ -1095,7 +1095,10 @@ class BasicNewsRecipe(Recipe):
def create_opf(self, feeds, dir=None):
if dir is None:
dir = self.output_dir
mi = MetaInformation(self.short_title() + strftime(self.timefmt), [__appname__])
title = self.short_title()
if self.output_profile.periodical_date_in_title:
title += strftime(self.timefmt)
mi = MetaInformation(title, [__appname__])
mi.publisher = __appname__
mi.author_sort = __appname__
mi.publication_type = 'periodical:'+self.publication_type