diff --git a/src/calibre/__init__.py b/src/calibre/__init__.py index 6d104650bc..2babb9182b 100644 --- a/src/calibre/__init__.py +++ b/src/calibre/__init__.py @@ -402,10 +402,17 @@ def my_unichr(num): def entity_to_unicode(match, exceptions=[], encoding='cp1252', result_exceptions={}): ''' - @param match: A match object such that '&'+match.group(1)';' is the entity. - @param exceptions: A list of entities to not convert (Each entry is the name of the entity, for e.g. 'apos' or '#1234' - @param encoding: The encoding to use to decode numeric entities between 128 and 256. + :param match: A match object such that '&'+match.group(1)';' is the entity. + + :param exceptions: A list of entities to not convert (Each entry is the name of the entity, for e.g. 'apos' or '#1234' + + :param encoding: The encoding to use to decode numeric entities between 128 and 256. If None, the Unicode UCS encoding is used. A common encoding is cp1252. + + :param result_exceptions: A mapping of characters to entities. If the result + is in result_exceptions, result_exception[result] is returned instead. + Convenient way to specify exception for things like < or > that can be + specified by various actual entities. ''' def check(ch): return result_exceptions.get(ch, ch) diff --git a/src/calibre/customize/builtins.py b/src/calibre/customize/builtins.py index c1d779bed9..44f4c61ca9 100644 --- a/src/calibre/customize/builtins.py +++ b/src/calibre/customize/builtins.py @@ -444,7 +444,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, EB511 +from calibre.devices.hanvon.driver import N516, EB511, ALEX from calibre.devices.edge.driver import EDGE from calibre.devices.teclast.driver import TECLAST_K3 from calibre.devices.sne.driver import SNE @@ -526,7 +526,8 @@ plugins += [ ELONEX, TECLAST_K3, EDGE, - SNE + SNE, + ALEX ] plugins += [x for x in list(locals().values()) if isinstance(x, type) and \ x.__name__.endswith('MetadataReader')] diff --git a/src/calibre/devices/hanvon/driver.py b/src/calibre/devices/hanvon/driver.py index d4f6e87d06..1e76b62eb6 100644 --- a/src/calibre/devices/hanvon/driver.py +++ b/src/calibre/devices/hanvon/driver.py @@ -34,6 +34,22 @@ class N516(USBMS): EBOOK_DIR_MAIN = 'e_book' SUPPORTS_SUB_DIRS = True +class ALEX(N516): + + name = 'Alex driver' + gui_name = 'SpringDesign Alex' + description = _('Communicate with the SpringDesign Alex eBook reader.') + author = 'Kovid Goyal' + + FORMATS = ['epub', 'pdf'] + VENDOR_NAME = 'ALEX' + WINDOWS_MAIN_MEM = 'READER' + + MAIN_MEMORY_VOLUME_LABEL = 'Alex Internal Memory' + + EBOOK_DIR_MAIN = 'eBooks' + SUPPORTS_SUB_DIRS = True + class EB511(USBMS): name = 'Elonex EB 511 driver' gui_name = 'EB 511' diff --git a/src/calibre/manual/faq.rst b/src/calibre/manual/faq.rst index b88c4474df..7c2f4ce49e 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, Entourage Edge, Longshine ShineBook, Ectaco Jetbook, BeBook/BeBook Mini, Irex Illiad/DR1000, Foxit eSlick, PocketBook 360, Italica, eClicto, Iriver Story, Airis dBook, Hanvon N515, Binatone Readme, Teclast K3, 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, Entourage Edge, Longshine ShineBook, Ectaco Jetbook, BeBook/BeBook Mini, Irex Illiad/DR1000, Foxit eSlick, PocketBook 360, Italica, eClicto, Iriver Story, Airis dBook, Hanvon N515, Binatone Readme, Teclast K3, SpringDesign Alex, 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|? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~