mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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:
parent
852ff2e6de
commit
08e994dc45
@ -233,18 +233,20 @@ class OutputProfile(Plugin):
|
|||||||
'if you want to produce a document intended to be read at a '
|
'if you want to produce a document intended to be read at a '
|
||||||
'computer or on a range of devices.')
|
'computer or on a range of devices.')
|
||||||
|
|
||||||
# The image size for comics
|
#: The image size for comics
|
||||||
comic_screen_size = (584, 754)
|
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
|
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 = False
|
||||||
touchscreen_news_css = ''
|
touchscreen_news_css = ''
|
||||||
# A list of extra (beyond CSS 2.1) modules supported by the device
|
#: A list of extra (beyond CSS 2.1) modules supported by the device
|
||||||
# Format is a cssutils profile dictionary (see iPad for example)
|
#: Format is a cssutils profile dictionary (see iPad for example)
|
||||||
extra_css_modules = []
|
extra_css_modules = []
|
||||||
|
#: If True, the date is appended to the title of downloaded news
|
||||||
|
periodical_date_in_title = True
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tags_to_string(cls, tags):
|
def tags_to_string(cls, tags):
|
||||||
@ -550,6 +552,7 @@ class KindleOutput(OutputProfile):
|
|||||||
fbase = 16
|
fbase = 16
|
||||||
fsizes = [12, 12, 14, 16, 18, 20, 22, 24]
|
fsizes = [12, 12, 14, 16, 18, 20, 22, 24]
|
||||||
supports_mobi_indexing = True
|
supports_mobi_indexing = True
|
||||||
|
periodical_date_in_title = False
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tags_to_string(cls, tags):
|
def tags_to_string(cls, tags):
|
||||||
@ -567,6 +570,7 @@ class KindleDXOutput(OutputProfile):
|
|||||||
dpi = 150.0
|
dpi = 150.0
|
||||||
comic_screen_size = (741, 1022)
|
comic_screen_size = (741, 1022)
|
||||||
supports_mobi_indexing = True
|
supports_mobi_indexing = True
|
||||||
|
periodical_date_in_title = False
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tags_to_string(cls, tags):
|
def tags_to_string(cls, tags):
|
||||||
|
@ -166,9 +166,9 @@ class iPhone(Device):
|
|||||||
|
|
||||||
class Android(Device):
|
class Android(Device):
|
||||||
|
|
||||||
name = 'Adroid phone + WordPlayer'
|
name = 'Adroid phone + WordPlayer/Aldiko'
|
||||||
output_format = 'EPUB'
|
output_format = 'EPUB'
|
||||||
manufacturer = 'Google/HTC'
|
manufacturer = 'Android'
|
||||||
id = 'android'
|
id = 'android'
|
||||||
|
|
||||||
class HanlinV3(Device):
|
class HanlinV3(Device):
|
||||||
|
@ -1095,7 +1095,10 @@ class BasicNewsRecipe(Recipe):
|
|||||||
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
|
||||||
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.publisher = __appname__
|
||||||
mi.author_sort = __appname__
|
mi.author_sort = __appname__
|
||||||
mi.publication_type = 'periodical:'+self.publication_type
|
mi.publication_type = 'periodical:'+self.publication_type
|
||||||
|
Loading…
x
Reference in New Issue
Block a user