From 5cee21063d7858664b0fc9a2f4111396fce17f9f Mon Sep 17 00:00:00 2001 From: John Schember Date: Wed, 30 Dec 2009 06:18:39 -0500 Subject: [PATCH] Add N516 driver. --- src/calibre/customize/builtins.py | 2 ++ src/calibre/devices/hanvon/__init__.py | 0 src/calibre/devices/hanvon/driver.py | 34 ++++++++++++++++++++++++++ src/calibre/manual/faq.rst | 2 +- 4 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 src/calibre/devices/hanvon/__init__.py create mode 100644 src/calibre/devices/hanvon/driver.py diff --git a/src/calibre/customize/builtins.py b/src/calibre/customize/builtins.py index 6e0c9321cd..c04a200671 100644 --- a/src/calibre/customize/builtins.py +++ b/src/calibre/customize/builtins.py @@ -418,6 +418,7 @@ from calibre.devices.eslick.driver import ESLICK from calibre.devices.nuut2.driver import NUUT2 from calibre.devices.iriver.driver import IRIVER_STORY from calibre.devices.binatone.driver import README +from calibre.devices.hanvon.driver import N516 from calibre.ebooks.metadata.fetch import GoogleBooks, ISBNDB, Amazon plugins = [HTML2ZIP, PML2PMLZ, GoogleBooks, ISBNDB, Amazon] @@ -486,6 +487,7 @@ plugins += [ BOOX, EB600, README, + N516, ] plugins += [x for x in list(locals().values()) if isinstance(x, type) and \ x.__name__.endswith('MetadataReader')] diff --git a/src/calibre/devices/hanvon/__init__.py b/src/calibre/devices/hanvon/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/calibre/devices/hanvon/driver.py b/src/calibre/devices/hanvon/driver.py new file mode 100644 index 0000000000..192c3e7fdb --- /dev/null +++ b/src/calibre/devices/hanvon/driver.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- + +__license__ = 'GPL v3' +__copyright__ = '2009, John Schember ' +__docformat__ = 'restructuredtext en' + +''' +Device driver for Hanvon devices +''' + +from calibre.devices.usbms.driver import USBMS + +class N516(USBMS): + + name = 'N516 driver' + gui_name = 'N516' + description = _('Communicate with the Hanvon N520 eBook reader.') + author = 'John Schember' + supported_platforms = ['windows', 'osx', 'linux'] + + # Ordered list of supported formats + FORMATS = ['epub', 'prc', 'html', 'pdf', 'txt'] + + VENDOR_ID = [0x0525] + PRODUCT_ID = [0xa4a5] + BCD = [0x323] + + VENDOR_NAME = 'INGENIC' + WINDOWS_MAIN_MEM = '_FILE-STOR_GADGE' + + MAIN_MEMORY_VOLUME_LABEL = 'N520 Internal Memory' + + EBOOK_DIR_MAIN = 'e_book' + SUPPORTS_SUB_DIRS = True diff --git a/src/calibre/manual/faq.rst b/src/calibre/manual/faq.rst index 0319f5bb21..9e0b2a85de 100644 --- a/src/calibre/manual/faq.rst +++ b/src/calibre/manual/faq.rst @@ -81,7 +81,7 @@ Device Integration What devices does |app| support? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -At the moment |app| has full support for the SONY PRS 300/500/505/600/700/900, Barnes & Noble Nook, Cybook Gen 3/Opus, Amazon Kindle 1/2/DX, Longshine ShineBook, Ectaco Jetbook, BeBook/BeBook Mini, Irex Illiad/DR1000, Foxit eSlick, PocketBook 360, Italica, eClicto, Iriver Story, Airis dBook, various Android phones and the iPhone. In addition, using the :guilabel:`Save to disk` function you can use it with any ebook reader that exports itself as a USB disk. +At the moment |app| has full support for the SONY PRS 300/500/505/600/700/900, Barnes & Noble Nook, Cybook Gen 3/Opus, Amazon Kindle 1/2/DX, Longshine ShineBook, Ectaco Jetbook, BeBook/BeBook Mini, Irex Illiad/DR1000, Foxit eSlick, PocketBook 360, Italica, eClicto, Iriver Story, Airis dBook, Hanvon N515, Binatone Readme, various Android phones and the iPhone. In addition, using the :guilabel:`Save to disk` function you can use it with any ebook reader that exports itself as a USB disk. How can I help get my device supported in |app|? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~