mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-05 10:53:43 +02:00
Add an output profile for the Kindle PaperWhite
This commit is contained in:
parent
f74d0e38e3
commit
85212fb0c1
2 changed files with 19 additions and 3 deletions
|
|
@ -654,6 +654,17 @@ def tags_to_string(cls, tags):
|
|||
return u'%s <br/><span style="color: white">%s</span>' % (', '.join(tags),
|
||||
'ttt '.join(tags)+'ttt ')
|
||||
|
||||
class KindlePaperWhiteOutput(KindleOutput):
|
||||
|
||||
name = 'Kindle PaperWhite'
|
||||
short_name = 'kindle_pw'
|
||||
description = _('This profile is intended for the Amazon Kindle PaperWhite')
|
||||
|
||||
# Screen size is a best guess
|
||||
screen_size = (658, 940)
|
||||
dpi = 212.0
|
||||
comic_screen_size = screen_size
|
||||
|
||||
class KindleFireOutput(KindleDXOutput):
|
||||
|
||||
name = 'Kindle Fire'
|
||||
|
|
@ -766,6 +777,6 @@ class PocketBook900Output(OutputProfile):
|
|||
SonyReaderLandscapeOutput, KindleDXOutput, IlliadOutput,
|
||||
IRexDR1000Output, IRexDR800Output, JetBook5Output, NookOutput,
|
||||
BambookOutput, NookColorOutput, PocketBook900Output, GenericEink,
|
||||
GenericEinkLarge, KindleFireOutput]
|
||||
GenericEinkLarge, KindleFireOutput, KindlePaperWhiteOutput]
|
||||
|
||||
output_profiles.sort(cmp=lambda x,y:cmp(x.name.lower(), y.name.lower()))
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class Kindle(Device):
|
|||
|
||||
output_profile = 'kindle'
|
||||
output_format = 'MOBI'
|
||||
name = 'Kindle Paperwhite/Touch/1-4'
|
||||
name = 'Kindle Touch/1-4'
|
||||
manufacturer = 'Amazon'
|
||||
id = 'kindle'
|
||||
|
||||
|
|
@ -118,6 +118,11 @@ class KindleFire(KindleDX):
|
|||
output_profile = 'kindle_fire'
|
||||
supports_color = True
|
||||
|
||||
class KindlePW(Kindle):
|
||||
name = 'Kindle PaperWhite'
|
||||
id = 'kindle_pw'
|
||||
output_profile = 'kindle_pw'
|
||||
|
||||
class Sony505(Device):
|
||||
|
||||
output_profile = 'sony'
|
||||
|
|
@ -550,7 +555,7 @@ def commit(self):
|
|||
def nextId(self):
|
||||
idx = list(self.device_view.selectionModel().selectedIndexes())[0]
|
||||
dev = self.dev_model.data(idx, Qt.UserRole)
|
||||
if dev in (Kindle, KindleDX):
|
||||
if dev in (Kindle, KindleDX, KindleFire, KindlePW):
|
||||
return KindlePage.ID
|
||||
if dev is iPhone:
|
||||
return StanzaPage.ID
|
||||
|
|
|
|||
Loading…
Reference in a new issue