mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Driver and profiles for Irex Digital Reader
This commit is contained in:
commit
b457af8d31
@ -349,6 +349,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.irexdr.driver import IREXDR1000
|
||||
from calibre.devices.jetbook.driver import JETBOOK
|
||||
from calibre.devices.kindle.driver import KINDLE, KINDLE2, KINDLE_DX
|
||||
from calibre.devices.prs500.driver import PRS500
|
||||
@ -393,6 +394,7 @@ plugins += [
|
||||
BLACKBERRY,
|
||||
CYBOOKG3,
|
||||
EB600,
|
||||
IREXDR1000,
|
||||
JETBOOK,
|
||||
KINDLE,
|
||||
KINDLE2,
|
||||
|
@ -112,6 +112,7 @@ class CybookG3Input(InputProfile):
|
||||
|
||||
class CybookOpusInput(InputProfile):
|
||||
|
||||
author = 'John Schember'
|
||||
name = 'Cybook Opus'
|
||||
short_name = 'cybook_opus'
|
||||
description = _('This profile is intended for the Cybook Opus.')
|
||||
@ -134,9 +135,33 @@ class KindleInput(InputProfile):
|
||||
fbase = 16
|
||||
fsizes = [12, 12, 14, 16, 18, 20, 22, 24]
|
||||
|
||||
class IlliadInput(InputProfile):
|
||||
|
||||
name = 'Illiad'
|
||||
short_name = 'illiad'
|
||||
description = _('This profile is intended for the Irex Illiad.')
|
||||
|
||||
screen_size = (760, 925)
|
||||
dpi = 160.0
|
||||
fbase = 12
|
||||
fsizes = [7.5, 9, 10, 12, 15.5, 20, 22, 24]
|
||||
|
||||
class IRexDR1000Input(InputProfile):
|
||||
|
||||
author = 'John Schember'
|
||||
name = 'IRex Digital Reader 1000'
|
||||
short_name = 'irexdr1000'
|
||||
description = _('This profile is intended for the IRex Digital Reader 1000.')
|
||||
|
||||
# Screen size is a best guess
|
||||
screen_size = (1024, 1280)
|
||||
dpi = 160
|
||||
fbase = 16
|
||||
fsizes = [12, 14, 16, 18, 20, 22, 24]
|
||||
|
||||
input_profiles = [InputProfile, SonyReaderInput, MSReaderInput,
|
||||
MobipocketInput, HanlinV3Input, CybookG3Input, KindleInput]
|
||||
MobipocketInput, HanlinV3Input, CybookG3Input, CybookOpusInput, KindleInput,
|
||||
IlliadInput, IRexDR1000Input]
|
||||
|
||||
|
||||
class OutputProfile(Plugin):
|
||||
@ -236,6 +261,7 @@ class CybookG3Output(OutputProfile):
|
||||
|
||||
class CybookOpusOutput(OutputProfile):
|
||||
|
||||
author = 'John Schember'
|
||||
name = 'Cybook Opus'
|
||||
short_name = 'cybook_opus'
|
||||
description = _('This profile is intended for the Cybook Opus.')
|
||||
@ -291,8 +317,21 @@ class IlliadOutput(OutputProfile):
|
||||
fbase = 12
|
||||
fsizes = [7.5, 9, 10, 12, 15.5, 20, 22, 24]
|
||||
|
||||
class IRexDR1000Output(OutputProfile):
|
||||
|
||||
author = 'John Schember'
|
||||
name = 'IRex Digital Reader 1000'
|
||||
short_name = 'irexdr1000'
|
||||
description = _('This profile is intended for the IRex Digital Reader 1000.')
|
||||
|
||||
# Screen size is a best guess
|
||||
screen_size = (1024, 1280)
|
||||
comic_screen_size = (996, 1241)
|
||||
dpi = 160
|
||||
fbase = 16
|
||||
fsizes = [12, 14, 16, 18, 20, 22, 24]
|
||||
|
||||
output_profiles = [OutputProfile, SonyReaderOutput, MSReaderOutput,
|
||||
MobipocketOutput, HanlinV3Output, CybookG3Output, KindleOutput,
|
||||
SonyReaderLandscapeOutput, KindleDXOutput]
|
||||
MobipocketOutput, HanlinV3Output, CybookG3Output, CybookOpusOutput,
|
||||
KindleOutput, SonyReaderLandscapeOutput, KindleDXOutput, IlliadOutput,
|
||||
IRexDR1000Output]
|
||||
|
@ -9,7 +9,6 @@ import shutil
|
||||
from itertools import cycle
|
||||
|
||||
from calibre import sanitize_file_name as sanitize
|
||||
from calibre.devices.errors import DeviceError, FreeSpaceError
|
||||
from calibre.devices.usbms.driver import USBMS
|
||||
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