From 34845ca878100430592c4af2887517e8d488d8f2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 8 May 2009 09:06:59 -0700 Subject: [PATCH 1/2] IGN:Increase timeout for metadata writer --- src/calibre/ebooks/metadata/pdf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/metadata/pdf.py b/src/calibre/ebooks/metadata/pdf.py index 769f169984..72376a5008 100644 --- a/src/calibre/ebooks/metadata/pdf.py +++ b/src/calibre/ebooks/metadata/pdf.py @@ -66,7 +66,7 @@ def set_metadata(stream, mi): 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: From e121e8523bed46bc60d694379897ebc7b5e694c6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 8 May 2009 09:07:32 -0700 Subject: [PATCH 2/2] Support for the BeBook by Tijmen Ruizendaal from BeBook --- src/calibre/devices/__init__.py | 4 ++- src/calibre/devices/bebook/__init__.py | 2 ++ src/calibre/devices/bebook/driver.py | 45 ++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 src/calibre/devices/bebook/__init__.py create mode 100644 src/calibre/devices/bebook/driver.py diff --git a/src/calibre/devices/__init__.py b/src/calibre/devices/__init__.py index cd3cd30734..06efbc6434 100644 --- a/src/calibre/devices/__init__.py +++ b/src/calibre/devices/__init__.py @@ -12,11 +12,13 @@ def devices(): from calibre.devices.cybookg3.driver import CYBOOKG3 from calibre.devices.kindle.driver import KINDLE from calibre.devices.kindle.driver import KINDLE2 + from calibre.devices.bebook.driver import BEBOOK + from calibre.devices.bebook.driver import BEBOOKMINI from calibre.devices.blackberry.driver import BLACKBERRY from calibre.devices.eb600.driver import EB600 from calibre.devices.jetbook.driver import JETBOOK return (PRS500, PRS505, PRS700, CYBOOKG3, KINDLE, KINDLE2, - BLACKBERRY, EB600, JETBOOK) + BEBOOK, BEBOOKMINI, BLACKBERRY, EB600, JETBOOK) import time diff --git a/src/calibre/devices/bebook/__init__.py b/src/calibre/devices/bebook/__init__.py new file mode 100644 index 0000000000..a4e8fdad76 --- /dev/null +++ b/src/calibre/devices/bebook/__init__.py @@ -0,0 +1,2 @@ +__license__ = 'GPL v3' +__copyright__ = '2009, Tijmen Ruizendaal ' diff --git a/src/calibre/devices/bebook/driver.py b/src/calibre/devices/bebook/driver.py new file mode 100644 index 0000000000..1b81fae27c --- /dev/null +++ b/src/calibre/devices/bebook/driver.py @@ -0,0 +1,45 @@ +__license__ = 'GPL v3' +__copyright__ = '2009, Tijmen Ruizendaal ' +''' +Device driver for BeBook +''' + +from calibre.devices.usbms.driver import USBMS + +class BEBOOK(USBMS): + # 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_MEM = 'BEBOOK_STORAGE_CARD' + + OSX_MAIN_MEM = 'BeBook Internal Memory' + OSX_CARD_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 BEBOOKMINI(BEBOOK): + + 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' +