mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
IRex Digtial Reader 1000 device driver (untested and only supporting windows, linux).
This commit is contained in:
parent
4daefc5575
commit
afd66f95b8
@ -9,7 +9,6 @@ import shutil
|
|||||||
from itertools import cycle
|
from itertools import cycle
|
||||||
|
|
||||||
from calibre import sanitize_file_name as sanitize
|
from calibre import sanitize_file_name as sanitize
|
||||||
from calibre.devices.errors import DeviceError, FreeSpaceError
|
|
||||||
from calibre.devices.usbms.driver import USBMS
|
from calibre.devices.usbms.driver import USBMS
|
||||||
import calibre.devices.cybookg3.t2b as t2b
|
import calibre.devices.cybookg3.t2b as t2b
|
||||||
|
|
||||||
|
0
src/calibre/devices/irexdr/__init__.py
Normal file
0
src/calibre/devices/irexdr/__init__.py
Normal file
57
src/calibre/devices/irexdr/driver.py
Normal file
57
src/calibre/devices/irexdr/driver.py
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
__license__ = 'GPL 3'
|
||||||
|
__copyright__ = '2009, John Schember <john@nachtimwald.com>'
|
||||||
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|
||||||
|
'''
|
||||||
|
Device driver for IRex Digiatal Reader
|
||||||
|
'''
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
from calibre.devices.usbms.driver import USBMS
|
||||||
|
|
||||||
|
class IREXDR1000(USBMS):
|
||||||
|
name = 'IRex Digital Reader 1000 Device Interface'
|
||||||
|
description = _('Communicate with the IRex Digital Reader 1000 eBook reader.')
|
||||||
|
author = _('John Schember')
|
||||||
|
supported_platforms = ['windows', 'linux']
|
||||||
|
|
||||||
|
|
||||||
|
# Ordered list of supported formats
|
||||||
|
# Be sure these have an entry in calibre.devices.mime
|
||||||
|
FORMATS = ['epub', 'mobi', 'prc', 'html', 'pdf', 'txt']
|
||||||
|
|
||||||
|
VENDOR_ID = [0x1e6b]
|
||||||
|
PRODUCT_ID = [0x001]
|
||||||
|
BCD = [0x322]
|
||||||
|
|
||||||
|
VENDOR_NAME = 'IREX'
|
||||||
|
WINDOWS_MAIN_MEM = 'DR1000'
|
||||||
|
|
||||||
|
#OSX_MAIN_MEM = ''
|
||||||
|
|
||||||
|
MAIN_MEMORY_VOLUME_LABEL = 'IRex Digital Reader 1000 Main Memory'
|
||||||
|
|
||||||
|
EBOOK_DIR_MAIN = ''
|
||||||
|
SUPPORTS_SUB_DIRS = True
|
||||||
|
|
||||||
|
def delete_books(self, paths, end_session=True):
|
||||||
|
for i, path in enumerate(paths):
|
||||||
|
self.report_progress((i+1) / float(len(paths)), _('Removing books from device...'))
|
||||||
|
if os.path.exists(path):
|
||||||
|
os.unlink(path)
|
||||||
|
|
||||||
|
filepath, ext = os.path.splitext(path)
|
||||||
|
|
||||||
|
# Delete the ebook auxiliary file
|
||||||
|
if os.path.exists(filepath + '.mbp'):
|
||||||
|
os.unlink(filepath + '.mbp')
|
||||||
|
|
||||||
|
try:
|
||||||
|
os.removedirs(os.path.dirname(path))
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
self.report_progress(1.0, _('Removing books from device...'))
|
Loading…
x
Reference in New Issue
Block a user