From a436d54952b20fd4272ec92720b0a77c115603e3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 13 Dec 2009 12:25:34 -0700 Subject: [PATCH] Device driver for the Nokia N770 --- src/calibre/customize/builtins.py | 2 ++ src/calibre/devices/cybookg3/driver.py | 3 ++- src/calibre/devices/eb600/driver.py | 2 +- src/calibre/devices/nokia/__init__.py | 0 src/calibre/devices/nokia/driver.py | 35 ++++++++++++++++++++++++++ 5 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 src/calibre/devices/nokia/__init__.py create mode 100644 src/calibre/devices/nokia/driver.py diff --git a/src/calibre/customize/builtins.py b/src/calibre/customize/builtins.py index f260b6cb30..81f88520ce 100644 --- a/src/calibre/customize/builtins.py +++ b/src/calibre/customize/builtins.py @@ -413,6 +413,7 @@ from calibre.devices.nook.driver import NOOK from calibre.devices.prs500.driver import PRS500 from calibre.devices.prs505.driver import PRS505, PRS700 from calibre.devices.android.driver import ANDROID +from calibre.devices.nokia.driver import N770 from calibre.devices.eslick.driver import ESLICK from calibre.devices.nuut2.driver import NUUT2 from calibre.devices.iriver.driver import IRIVER_STORY @@ -469,6 +470,7 @@ plugins += [ PRS700, PRS500, ANDROID, + N770, CYBOOK_OPUS, COOL_ER, SHINEBOOK, diff --git a/src/calibre/devices/cybookg3/driver.py b/src/calibre/devices/cybookg3/driver.py index f674fddf36..1cf51f78ec 100644 --- a/src/calibre/devices/cybookg3/driver.py +++ b/src/calibre/devices/cybookg3/driver.py @@ -11,6 +11,7 @@ Device driver for Bookeen's Cybook Gen 3 import os from itertools import cycle +from calibre import islinux from calibre.devices.usbms.driver import USBMS import calibre.devices.cybookg3.t2b as t2b @@ -19,7 +20,7 @@ class CYBOOKG3(USBMS): name = 'Cybook Gen 3 Device Interface' gui_name = 'Cybook Gen 3' description = _('Communicate with the Cybook Gen 3 eBook reader.') - author = _('John Schember') + author = 'John Schember' supported_platforms = ['windows', 'osx', 'linux'] # Ordered list of supported formats diff --git a/src/calibre/devices/eb600/driver.py b/src/calibre/devices/eb600/driver.py index e0c031f30c..90abee0fbe 100644 --- a/src/calibre/devices/eb600/driver.py +++ b/src/calibre/devices/eb600/driver.py @@ -101,7 +101,7 @@ class GER2(EB600): name = 'Ganaxa GeR2 Device Interface' gui_name = 'Ganaxa GeR2' - supported_platforms = ['windows'] + supported_platforms = ['windows', 'linux', 'osx'] FORMATS = ['pdf'] diff --git a/src/calibre/devices/nokia/__init__.py b/src/calibre/devices/nokia/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/calibre/devices/nokia/driver.py b/src/calibre/devices/nokia/driver.py new file mode 100644 index 0000000000..e6944de4d9 --- /dev/null +++ b/src/calibre/devices/nokia/driver.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- + +__license__ = 'GPL v3' +__copyright__ = '2009, John Schember ' +__docformat__ = 'restructuredtext en' + +''' +Device driver for Nokia's internet tablet devices +''' + +from calibre.devices.usbms.driver import USBMS + +class N770(USBMS): + + name = 'Nokia 770 Device Interface' + gui_name = 'Nokia 770' + description = _('Communicate with the Nokia Nokia 770 internet tablet.') + author = 'John Schember' + supported_platforms = ['windows', 'linux', 'osx'] + + # Ordered list of supported formats + FORMATS = ['mobi', 'prc', 'epub', 'html', 'zip', 'fb2', 'chm', 'pdb', + 'tcr', 'txt', 'rtf'] + + VENDOR_ID = [0x111] + PRODUCT_ID = [0x1af] + BCD = [0x134] + + VENDOR_NAME = 'NOKIA' + WINDOWS_MAIN_MEM = '770' + + MAIN_MEMORY_VOLUME_LABEL = 'N770 Main Memory' + + EBOOK_DIR_MAIN = 'My Ebooks' + SUPPORTS_SUB_DIRS = True