mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Initial implementation of aq driver for the Irex Illiad
This commit is contained in:
commit
24f1aa4d5a
@ -356,6 +356,7 @@ from calibre.devices.bebook.driver import BEBOOK, BEBOOK_MINI
|
||||
from calibre.devices.blackberry.driver import BLACKBERRY
|
||||
from calibre.devices.cybookg3.driver import CYBOOKG3
|
||||
from calibre.devices.eb600.driver import EB600
|
||||
from calibre.devices.iliad.driver import ILIAD
|
||||
from calibre.devices.irexdr.driver import IREXDR1000
|
||||
from calibre.devices.jetbook.driver import JETBOOK
|
||||
from calibre.devices.kindle.driver import KINDLE, KINDLE2, KINDLE_DX
|
||||
@ -401,6 +402,7 @@ plugins += [
|
||||
BLACKBERRY,
|
||||
CYBOOKG3,
|
||||
EB600,
|
||||
ILIAD,
|
||||
IREXDR1000,
|
||||
JETBOOK,
|
||||
KINDLE,
|
||||
|
0
src/calibre/devices/iliad/__init__.py
Normal file
0
src/calibre/devices/iliad/__init__.py
Normal file
57
src/calibre/devices/iliad/driver.py
Normal file
57
src/calibre/devices/iliad/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 Iliad
|
||||
'''
|
||||
|
||||
import os
|
||||
|
||||
from calibre.devices.usbms.driver import USBMS
|
||||
|
||||
class ILIAD(USBMS):
|
||||
name = 'IRex Iliad Device Interface'
|
||||
description = _('Communicate with the IRex Iliad 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 = ['mobi', 'prc', 'html', 'pdf', 'txt']
|
||||
|
||||
VENDOR_ID = [0x04cc]
|
||||
PRODUCT_ID = [0x1a64]
|
||||
BCD = [0x100]
|
||||
|
||||
VENDOR_NAME = 'IREX'
|
||||
WINDOWS_MAIN_MEM = 'ILIAD'
|
||||
|
||||
#OSX_MAIN_MEM = ''
|
||||
|
||||
MAIN_MEMORY_VOLUME_LABEL = 'IRex Iliad Main Memory'
|
||||
|
||||
EBOOK_DIR_MAIN = 'books'
|
||||
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