mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Initial driver (windows only) for the Iriver Story. Fixes #3904 (Support for the Iriver Story)
This commit is contained in:
parent
927868c69a
commit
d6add4c5cc
@ -372,6 +372,7 @@ from calibre.devices.prs700.driver import PRS700
|
|||||||
from calibre.devices.android.driver import ANDROID
|
from calibre.devices.android.driver import ANDROID
|
||||||
from calibre.devices.eslick.driver import ESLICK
|
from calibre.devices.eslick.driver import ESLICK
|
||||||
from calibre.devices.nuut2.driver import NUUT2
|
from calibre.devices.nuut2.driver import NUUT2
|
||||||
|
from calibre.devices.iriver.driver import IRIVER_STORY
|
||||||
|
|
||||||
plugins = [HTML2ZIP]
|
plugins = [HTML2ZIP]
|
||||||
plugins += [
|
plugins += [
|
||||||
@ -427,7 +428,8 @@ plugins += [
|
|||||||
COOL_ER,
|
COOL_ER,
|
||||||
SHINEBOOK,
|
SHINEBOOK,
|
||||||
ESLICK,
|
ESLICK,
|
||||||
NUUT2
|
NUUT2,
|
||||||
|
IRIVER_STORY
|
||||||
]
|
]
|
||||||
plugins += [x for x in list(locals().values()) if isinstance(x, type) and \
|
plugins += [x for x in list(locals().values()) if isinstance(x, type) and \
|
||||||
x.__name__.endswith('MetadataReader')]
|
x.__name__.endswith('MetadataReader')]
|
||||||
|
10
src/calibre/devices/iriver/__init__.py
Normal file
10
src/calibre/devices/iriver/__init__.py
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
|
||||||
|
from __future__ import with_statement
|
||||||
|
|
||||||
|
__license__ = 'GPL v3'
|
||||||
|
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||||
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|
||||||
|
|
||||||
|
|
46
src/calibre/devices/iriver/driver.py
Normal file
46
src/calibre/devices/iriver/driver.py
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
|
||||||
|
from __future__ import with_statement
|
||||||
|
|
||||||
|
__license__ = 'GPL v3'
|
||||||
|
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||||
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|
||||||
|
from calibre.devices.usbms.driver import USBMS
|
||||||
|
|
||||||
|
class IRIVER_STORY(USBMS):
|
||||||
|
|
||||||
|
name = 'Iriver Story Device Interface'
|
||||||
|
gui_name = 'Iriver Story'
|
||||||
|
description = _('Communicate with the Iriver Story reader.')
|
||||||
|
author = _('Kovid Goyal')
|
||||||
|
supported_platforms = ['windows', 'osx', 'linux']
|
||||||
|
|
||||||
|
# Ordered list of supported formats
|
||||||
|
FORMATS = ['epub', 'pdf', 'txt']
|
||||||
|
|
||||||
|
VENDOR_ID = [0x1006]
|
||||||
|
PRODUCT_ID = [0x4023]
|
||||||
|
BCD = [0x0323]
|
||||||
|
|
||||||
|
VENDOR_NAME = 'IRIVER'
|
||||||
|
WINDOWS_MAIN_MEM = 'STORY'
|
||||||
|
WINDOWS_CARD_A_MEM = 'STORY'
|
||||||
|
|
||||||
|
#OSX_MAIN_MEM = 'Kindle Internal Storage Media'
|
||||||
|
#OSX_CARD_A_MEM = 'Kindle Card Storage Media'
|
||||||
|
|
||||||
|
MAIN_MEMORY_VOLUME_LABEL = 'Story Main Memory'
|
||||||
|
STORAGE_CARD_VOLUME_LABEL = 'Story Storage Card'
|
||||||
|
|
||||||
|
SUPPORTS_SUB_DIRS = True
|
||||||
|
|
||||||
|
def windows_sort_drives(self, drives):
|
||||||
|
main = drives.get('main', None)
|
||||||
|
card = drives.get('carda', None)
|
||||||
|
if card and main and card < main:
|
||||||
|
drives['main'] = card
|
||||||
|
drives['carda'] = main
|
||||||
|
|
||||||
|
return drives
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user