Sync to pluginize

This commit is contained in:
John Schember 2009-05-08 18:10:05 -04:00
commit cff3125b80
6 changed files with 66 additions and 12 deletions

View File

@ -320,13 +320,14 @@ from calibre.devices.kindle.driver import KINDLE2
from calibre.devices.blackberry.driver import BLACKBERRY
from calibre.devices.eb600.driver import EB600
from calibre.devices.jetbook.driver import JETBOOK
from calibre.devices.bebook.driver import BEBOOK, BEBOOK_MINI
plugins = [HTML2ZIP, EPUBInput, MOBIInput, PDBInput, PDFInput, HTMLInput,
TXTInput, OEBOutput, TXTOutput, PDFOutput, LITInput, ComicInput,
FB2Input, ODTInput, RTFInput, EPUBOutput, RecipeInput, PMLInput,
PMLOutput, MOBIOutput, PDBOutput, LRFOutput, LITOutput]
plugins += [PRS500, PRS505, PRS700, CYBOOKG3, KINDLE, KINDLE2, BLACKBERRY,
EB600, JETBOOK]
EB600, JETBOOK, BEBOOK, BEBOOK_MINI]
plugins += [x for x in list(locals().values()) if isinstance(x, type) and \
x.__name__.endswith('MetadataReader')]
plugins += [x for x in list(locals().values()) if isinstance(x, type) and \

View File

@ -0,0 +1,2 @@
__license__ = 'GPL v3'
__copyright__ = '2009, Tijmen Ruizendaal <tijmen at mybebook.com>'

View File

@ -0,0 +1,53 @@
__license__ = 'GPL v3'
__copyright__ = '2009, Tijmen Ruizendaal <tijmen at mybebook.com>'
'''
Device driver for BeBook
'''
from calibre.devices.usbms.driver import USBMS
class BEBOOK(USBMS):
name = 'BeBook driver'
description = _('Communicate with the BeBook eBook reader.')
author = _('Tijmen Ruizendaal')
supported_platforms = ['windows', 'osx', 'linux']
# Ordered list of supported formats
FORMATS = ['mobi', 'epub', 'pdf', 'mobi', 'txt']
VENDOR_ID = [0x0525]
PRODUCT_ID = [0x8803, 0x6803]
BCD = [0x312]
VENDOR_NAME = 'BEBOOK'
WINDOWS_MAIN_MEM = 'BEBOOK_INTERNAL_MEMORY'
WINDOWS_CARD_A_MEM = 'BEBOOK_STORAGE_CARD'
OSX_MAIN_MEM = 'BeBook Internal Memory'
OSX_CARD_A_MEM = 'BeBook Storage Card'
MAIN_MEMORY_VOLUME_LABEL = 'BeBook Internal Memory'
STORAGE_CARD_VOLUME_LABEL = 'BeBook Storage Card'
SUPPORTS_SUB_DIRS = True
FDI_LUNS = {'lun0':1, 'lun1':0, 'lun2':2}
class BEBOOK_MINI(BEBOOK):
name = 'BeBook Mini driver'
description = _('Communicate with the BeBook Mini eBook reader.')
VENDOR_ID = [0x0492]
PRODUCT_ID = [0x8813]
BCD = [0x319]
WINDOWS_MAIN_MEM = 'BEBOOKMINI_INTERNAL_MEMORY'
WINDOWS_CARD_MEM = 'BEBOOKMINI_STORAGE_CARD'
OSX_MAIN_MEM = 'BeBook Mini Internal Memory'
OSX_CARD_MEM = 'BeBook Mini Storage Card'
MAIN_MEMORY_VOLUME_LABEL = 'BeBook Mini Internal Memory'
STORAGE_CARD_VOLUME_LABEL = 'BeBook Mini Storage Card'

View File

@ -80,7 +80,7 @@ def set_metadata(stream, mi):
for page in orig_pdf.pages:
out_pdf.addPage(page)
writer.start()
writer.join(10) # Wait 10 secs for writing to complete
writer.join(15) # Wait 15 secs for writing to complete
out_pdf.killed = True
writer.join()
if out_pdf.killed:

View File

@ -4,8 +4,6 @@ __license__ = 'GPL 3'
__copyright__ = '2009, John Schember <john@nachtimwald.com>'
__docformat__ = 'restructuredtext en'
import sys
from PyQt4.Qt import QString, SIGNAL
from calibre.gui2.convert.single import Config, sort_formats_by_preference, \
@ -65,10 +63,10 @@ class BulkConfig(Config):
toc = widget_factory(TOCWidget)
output_widget = None
name = 'calibre.gui2.convert.%s' % self.plumber.output_plugin.name.lower().replace(' ', '_')
name = self.plumber.output_plugin.name.lower().replace(' ', '_')
try:
__import__(name)
output_widget = sys.modules[name]
output_widget = __import__('calibre.gui2.convert.'+name,
fromlist=[1])
pw = output_widget.PluginWidget
pw.ICON = ':/images/back.svg'
pw.HELP = _('Options specific to the output format.')

View File

@ -142,10 +142,10 @@ class Config(ResizableDialog, Ui_Dialog):
toc = widget_factory(TOCWidget)
output_widget = None
name = 'calibre.gui2.convert.%s' % self.plumber.output_plugin.name.lower().replace(' ', '_')
name = self.plumber.output_plugin.name.lower().replace(' ', '_')
try:
__import__(name)
output_widget = sys.modules[name]
output_widget = __import__('calibre.gui2.convert.'+name,
fromlist=[1])
pw = output_widget.PluginWidget
pw.ICON = ':/images/back.svg'
pw.HELP = _('Options specific to the output format.')
@ -155,8 +155,8 @@ class Config(ResizableDialog, Ui_Dialog):
input_widget = None
name = 'calibre.gui2.convert.%s' % self.plumber.input_plugin.name.lower().replace(' ', '_')
try:
__import__(name)
input_widget = sys.modules[name]
input_widget = __import__('calibre.gui2.convert.'+name,
fromlist=[1])
pw = input_widget.PluginWidget
pw.ICON = ':/images/forward.svg'
pw.HELP = _('Options specific to the input format.')