Skip to content Skip to sidebar Skip to footer

Can Kobo Clara Read Barnes and Noble Books

calibre-kobo-driver

jgoguen / calibre-kobo-driver Goto Github PK

162.0 12.0 17.0 iv.82 MB

An extension of the existing KoboTouch driver provided with Calibre. This plugin allows modifying ePub files to enable actress Kobo features. I am providing code in the repository to you nether an open source license. Because this is my personal repository, the license you lot receive to my code is from me and not my employer.

License: GNU Full general Public License v3.0

Python 88.14% CSS 0.08% HTML vii.28% JavaScript 0.01% Shell 4.49%
kobo calibre device-driver python driver-plugin conversion kobo-device

calibre-kobo-commuter'south Introduction

Kobo KePub plugins

Buy Me a Coffee at ko-fi.com Donate using Liberapay

PayPal: https://paypal.me/jtgoguen


CI Lint


This provides a series of calibre extensions enabling calibre to piece of work with ePub files with Kobo's actress features (called KePub). The following plugins are available:

  • KoboTouchExtended: This is a device driver plugin extending the capabilities of the existing KoboTouch commuter provided with Calibre to enable extra Kobo features. Delight annotation: modified books are not saved back into your Calibre library to prevent problems with overwriting library configurations, so books get converted in transit to your device every time. In general, the extra fourth dimension required should non exist noticeable.
  • KePub Output: This is a conversion plugin assuasive calibre to convert any supported input format to KePub.
  • KePub Metadata Writer: This is a metadata plugin which supports the KePub Output plugin. Installing this plugin allows calibre to write KePub metadata to the volume as it's written out in calibre'due south conversion process. It serves no purpose without the KePub Output plugin.
  • KePub Input: This is a conversion plugin allowing calibre to convert KePub to any supported output format.
  • KePub Metadata Reader: This is a metadata plugin which allows calibre to read KePub metadata when converting a book from KePub format. It serves no purpose without the KePub Input plugin.

WARNING: THE KEPUB FILE STRUCTURE IS Non YET FULLY UNDERSTOOD. Practice Not, Under Whatever CIRCUMSTANCES, DELETE THE FILES FOR THE SOURCE FORMAT. E'er Take A Non-KEPUB FORMAT FOR YOUR BOOKS.

When viewing a KePub volume on a Kobo reader, a different viewer displays the contents than an ePub file. The primary benefits of using the KePub viewer are:

  • Page numbers prove the number of page turns remaining in the current chapter instead of the estimated number of pages for the unabridged book.
    • The KoboTouchExtended driver has an option to employ full-book page numbers instead if you lot prefer that.
  • Reading statistics (time left in this chapter, fourth dimension for the side by side affiliate, fourth dimension to complete the book)
  • The book title is at the top of each page.
  • The affiliate title, if whatever, is at the lesser of each page with the page numbers.

Depending on your preferences, there are some areas where the ePub renderer is a better choice than the KePub renderer:

  • Improve hyphenation. The KePub renderer sometimes hyphenates words in the wrong place if they have trailing punctuation.
  • Full justification works. The KePub renderer sometimes doesn't correctly justify lines with symbols represented by HTML entities (such as em-dashes or ellipses).
  • Embedded fonts are amend supported.

Installation

To install the current release version of this plugin directly within calibre:

  1. Open calibre'southward preferences, choose Plugins, and click Become new plugins
  2. Select the proper name of the plugins you want to install from the list of available plugins and click Install
    1. Don't see it? Y'all may already take it installed. Restart calibre and see if you get a notification of a pending update.
    2. If you want to install more than one plugin, you must select and install them ane at a time. Calibre displays a notification asking you to restart after each one, but y'all can wait until after y'all've installed all desired plugins to restart calibre.
  3. Restart calibre

Download

To download this plugin, either clone the repository or download a snapshot. Information technology is non necessary to download this plugin in this way unless you lot want to install from source for some reason, such as plugin evolution.

Install from source

Delight note, installation from source is not supported on Windows or macOS prior to 11 (Large Sur). Run scripts/build.sh to generate the ZIP file package for all plugins. You must have python3 and zsh installed.

Windows users may be able to use Windows Subsystem for Linux to run the build script, but this is not tested or supported.

Add together the resulting Naught file to calibre:

  1. Preferences
  2. Plugins
  3. Load plugin from file

Usage

To employ the device driver plugin after installing:

  1. Connect your supported Kobo device and wait for calibre to detect it
  2. Select the books you lot want to send to your device.
  3. Click the Ship to device push.

To use the conversion output format plugin subsequently installing:

  1. Choose the book you want to convert to KePub format
  2. Choose the KEPUB format from the list of output formats (top-right of the conversion window)
  3. Cull KePub Options from the left menu and brand your pick selections
  4. Click OK

Warning: THE KEPUB FILE Construction IS NOT Still FULLY UNDERSTOOD. DO NOT, UNDER ANY CIRCUMSTANCES, DELETE THE FILES FOR THE SOURCE FORMAT. ALWAYS Accept A Not-KEPUB FORMAT FOR YOUR BOOKS.

To utilise the conversion input format plugin after installing:

  1. Choose the KePub volume you want to catechumen to a different format
  2. Choose the desired target format from the listing of output formats (top-correct of the conversion window)
  3. Click OK

Special Annotation

Yous should turn off the congenital-in KoboTouch driver (authored by David Forrester) while using this plugin. On rare occasions, calibre may inadvertently select the congenital-in KoboTouch driver instead of this plugin. But do not turn off the congenital-in Kobo driver.

Adding Arbitrary Styles

The device commuter plugin, through the base KoboTouch driver provided with calibre, can copy all rules from a specific CSS file into each book during upload. To support maintaining device-specific CSS files, the device driver can copy a CSS file into the right place to allow adding it to each book. To practice this, locate the calibre plugin directory, create a CSS file in at that place, and select the Modify CSS option in the driver preferences. To locate the calibre plugin directory, open calibre's preferences, choose Miscellaneous, and click the Open calibre configuration directory push. The plugin directory is in there.

The name of the CSS file must be in the format kobo_extra_<DEVICE>.css. The plugins support the following replacements for <DEVICE> (capitalization is important):

  • Kobo Aura Water—AURAH2O (kobo_extra_AURAH2O.css)
  • Kobo Aureola H2O Edition ii—AURAH2O_2 (kobo_extra_AURAH2O_2.css)
  • Kobo Aura Hard disk—AURAHD (kobo_extra_AURAHD.css)
  • Kobo Aura—AURA (kobo_extra_AURA.css)
  • Kobo Aura Edition 2—AURA_2 (kobo_extra_AURA_2.css)
  • Kobo Aura One—AURAONE (kobo_extra_AURAONE.css)
  • Kobo Clara—CLARA (kobo_extra_CLARA.css)
  • Kobo Forma—FORMA (kobo_extra_FORMA.css)
  • Kobo Elipsa—ELIPSA (kobo_extra_ELIPSA.css)
  • Kobo Glo—GLO (kobo_extra_GLO.css)
  • Kobo Glo Hard disk—GLOHD (kobo_extra_GLOHD.css)
  • Kobo Libra—LIBRA (kobo_extra_LIBRA.css)
  • Kobo Libra 2—LIBRA_2 (kobo_extra_LIBRA_2.css)
  • Kobo Nia—NIA (kobo_extra_NIA.css)
  • Kobo Sage—SAGE (kobo_extra_SAGE.css)
  • Kobo Mini—MINI (kobo_extra_MINI.css)
  • Kobo Touch—TOUCH (kobo_extra_TOUCH.css)
  • Kobo Touch 2—Impact (kobo_extra_TOUCH_2.css)

Delight note, this overwrites whatsoever kobo_extra.css you may have already sent to your Kobo device. If you lot accept created the kobo_extra.css file on your Kobo device already and y'all want to make use of this feature, you must copy kobo_extra.css to the calibre plugin directory.

Delight as well be aware that support for some Kobo devices (the Aureola H2o, Libra, Forma, etc.) was not added until later calibre versions than the earliest version required for this plugin. Accordingly, yous'll demand to exist running a calibre version with back up for your device for this feature to work for all devices.

Hyphenation

The driver plugin and the conversion output plugin includes the ability to add a CSS file to each book enabling KePub hyphenation. The standard hyphenation dictionaries provided on Kobo devices are somewhat deficient for some languages; fixing this (or adding your own lexicon) requires a piddling work and requires that you can create gzipped tarballs (.tgz files). Note that you tin update existing dictionaries simply y'all cannot add new ones.

  1. Somewhere on your reckoner, create the directory structure usr/local/Kobo/hyphenDicts (capitalization is important)
  2. Download the LibreOffice hyphenation dictionary for your language
    1. You're looking for a file with the oxt extension. This is just a Nix archive with a different name.
  3. Unzip the OXT file (Windows users demand to rename the file to alter the extension to nada, which requires configuring Explorer to prove file extensions, which is a good thought to do anyhow) and look for the file named as hyph_[language].dic.
  4. Copy the hyphenation lexicon to the hyphenDicts folder without irresolute the proper noun.
  5. Add the usr folder to KoboRoot.tgz
    1. UNIX users (Linux, Solaris, BSD, Mac, etc.) can, from a last window, run tar czf KoboRoot.tgz usr/ from wherever you put the usr directory.
    2. Windows users, you're on your ain. You lot may be able to use the free 7-Nix archiver to create .tgz files. See this article for more details.
      1. If you lot follow these directions, your file should have the extension .tar.gz. Rename this to .tgz subsequently creating the file and ignore the Windows warning about irresolute file extensions.

Once yous have created KoboRoot.tgz copy information technology to the .kobo directory on your Kobo device, unmount/eject the bulldoze, and unplug the device. You'll see a screen indicating that the Kobo device is updating; it isn't, merely this method takes advantage of the Kobo update mechanism to load the necessary lexicon files and the Kobo device cannot distinguish between this and a real software update. Make sure you keep your version of KoboRoot.tgz around, you'll need to re-utilise it afterward every Kobo software update.

Provided languages are:

  1. The states English (en_US)
  2. French (fr_FR)
  3. Spanish (es_ES)
  4. High german (de_DE)
  5. Italian (it_IT)
  6. Portuguese (pt_PT)
  7. Dutch (nl_NL)

Please notation that even with this feature, hyphenation is not exact. Besides remember that you can update existing dictionaries merely not add new dictionaries.

Kobo JavaScript Extraction

Both the commuter and conversion output plugins include the ability to extract the Kobo JavaScript file from a free Kobo-supplied KePub which is not encumbered by any Digital Restrictions Management (DRM). To avoid distributing any of Kobo'due south copyrighted work, enabling this requires a niggling work:

  1. Get a KePub file from Kobo without any Digital Restrictions Management.
    1. Some of Kobo's free ebooks exercise not have DRM.
    2. In some regions, Kobo devices take free ebooks pre-loaded in the .kobo/kepub/ folder on the device which exercise not accept DRM.
  2. Copy the KePub file to the calibre plugins directory
    1. To notice the plugins directory, open up calibre's preferences, choose Miscellaneous, and click Open up calibre configuration directory
    2. Get to the plugins directory
  3. Rename the KePub file to reference.kepub.epub
    1. Windows users must be sure to show file extensions in Windows Explorer to exist able to rename the file.

Once this file is in place with the correct name, the driver and conversion output plugins automatically extracts the Kobo JavaScript file, add information technology to books during conversion, and add together appropriate references to content files.

Generated KePub File Copying

On occasion, such as for debugging purposes, you lot may wish to have easy admission to the generated KePub file. The device driver plugin has an option which allows you lot to enter the full, absolute path to a directory to copy generated files to after conversion. This directory must:

  1. Be somewhere you can write to
  2. Incorporate no variables
    1. Bone 10 and Linux users may use a tilde (~) to refer to their home directory instead of typing it in full (~/calibre-debug instead of /domicile/jgoguen/calibre-debug). Windows users must ever enter a total path.

The final path is a combination of this path and the save template for the plugin. If your debug path is /home/jgoguen/calibre-debug and your save template is {author_sort}/{championship} so a KePub file gets copied to, for example, /home/jgoguen/calibre-debug/Camerata, Jo/A History of Vanguard Industries.kepub.epub. Directories get created as needed.

Contributing

Decided you want to contribute to the evolution of these plugins?

  1. Contribute code, whether for existing bug reports, for new bugs that you found, or for new features that you desire to encounter implemented. To contribute code, you may fork the repository and ship a Github pull request, or you may send me a PM on MobileRead with a git patch file.
  2. Submit bug reports. Bug reports are my to-exercise listing for this plugin; whatsoever requests anywhere else may go missed and forgotten and direct emails are ignored. Although I'm happy to discuss the plugins on the MobileRead forums, I may still need yous to create a bug report; this is then I actually recall to investigate your asking.
  3. Test pre-released lawmaking from Github. Between releases, new code is committed to the Github repository. Submit any issues reports, feedback, feature requests you lot think of during your testing.
  4. Translate text. Translations use the Transifex translation project.

Y'all may likewise prefer to contribute in some other style. You lot may contribute past answering questions from other people who may have issues, continuing to use this plugin and providing feedback, assisting with purchasing new Kobo readers for connected testing, and probably other ways I haven't thought of even so.

Contributors

Thank you goes to these, and others, for their help and contributions to this project (emoji key):


hub2git
📖

dchawisher
🐛

Byte6d65
🐛

NiLuJe
💻

David
💻

Asking Questions

Wondering how to practise something? Want to know if something is possible? Post your question on the MobileRead Forum thread for the relevant plugin:

  • KoboTouchExtended
  • KePub Output
  • KePub Metadata Writer
  • KePub Input
  • KePub Metadata Reader

Reporting a Issues

Plant a bug with this plugin? Please go to Github and submit a new bug report. Under no circumstances should you send a directly email without first checking with me. At my sole discretion I may not read emails I oasis't asked for. Anybody benefits from a public bug tracker, merely one person benefits from a private email.

When submitting a bug, I require the following information simply whatsoever extra information is good to include:

  1. What version of calibre and plugin you are using. If yous are non on the latest plugin version, you must update before submitting any issues written report. If you are non on the latest version of calibre, I may not be able to reproduce the issue.
  2. The full mistake message reported past calibre, if whatever.
  3. For problems processing books, if you lot have a book that yous are able to include that demonstrates the issue or not. DO NOT UPLOAD EBOOK FILES TO THE Consequence TRACKER! Nether no circumstances are you immune to upload copyrighted content to a public issues. If I need a book file I'll transport you a link to use to upload 1.
  4. The calibre debug log. Bug reports without this become the needs-information tag practical.
    1. To get the calibre debug log, click the arrow abreast the "Preferences" menu, cull "Restart in debug mode", repeat the aforementioned action that caused the effect, and close calibre. The debug log is automatically displayed to you.

Known Issues

If you have installed the device driver plugin in calibre 0.9.xviii or earlier, then you lot upgrade to calibre 0.9.19 or later and can't update the plugin or install the conversion output format plugin, you must manually supplant the device commuter plugin Cypher file:

  1. Download the latest version of the code.
  2. Generate a new plugin ZIP file.
  3. Shut down calibre entirely.
  4. Open the calibre plugin directory.
    1. Don't know where this is? Earlier you shut calibre, open calibre'south preferences, choose Miscellaneous, and click the Open calibre configuration directory button. The plugin directory is in there.
  5. Supplant the file named KoboTouchExtended.zip with the new version you created. Please brand sure the filename remains the same.

If you get an mistake like the following:

                    Traceback (most recent call concluding): File "site-packages\calibre\gui2\preferences\plugins.py", line 310, in add_plugin File "site-packages\calibre\customize\ui.py", line 361, in add_plugin File "site-packages\calibre\customize\ui.py", line 53, in load_plugin File "site-packages\calibre\customize\zipplugin.py", line 169, in load File "importlib__init__.py", line 37, in import_module File "site-packages\calibre\customize\zipplugin.py", line 147, in load_module File "calibre_plugins.kobotouch_extended.__init__", line 4 <!DOCTYPE html> ^ SyntaxError: invalid syntax                                      

The solution is to re-read the Known Issues section.

calibre-kobo-driver's People

calibre-kobo-driver's Issues

Calibre doesnt't detect Kobo Glo

Since I updated from Calibre 0.9.22 to 0.nine.25 my Kobo Glo is nt detected.

I just downloaded and updated the KoboTouchExtended.nil plugin.
I created the KoboTouchExtended folder and added the hyphenation dictionary.
Kobo Desktop detects the Glo

The debug file reads equally follows:
calibre Debug log
calibre 0.9.25 isfrozen: True is64bit: Fake
Windows-post2008Server-vi.2.9200 Windows ('32bit', 'WindowsPE')
('Windows', 'post2008Server', '6.2.9200')
Python 2.seven.3
Windows: ('post2008Server', 'half-dozen.2.9200', '', 'Multiprocessor Complimentary')
Qt: Untested Windows version half-dozen.2 detected!
Starting up...
Loaded buried store plugin for: Amazon FR Kindle at version: three
Loaded cached shop plugin for: Barnes and Noble at version: ii
Loaded cached shop plugin for: Amazon DE Kindle at version: 3
Loaded buried store plugin for: Amazon Kindle at version: 3
Loaded cached store plugin for: Project Gutenberg at version: ii
Loaded buried store plugin for: Amazon United kingdom of great britain and northern ireland Kindle at version: three
Loaded cached store plugin for: Amazon It Kindle at version: iii
Loaded buried store plugin for: Amazon ES Kindle at version: 3
Started up in xvi.33 seconds with 415 books

The Debug Device Detection reads as follows:
calibre 0.9.25 isfrozen: True is64bit: False
Windows-post2008Server-6.two.9200 Windows ('32bit', 'WindowsPE')
('Windows', 'post2008Server', 'half-dozen.2.9200')
Python two.7.3
Windows: ('post2008Server', 'six.2.9200', '', 'Multiprocessor Free')
USB devices on system:
[u'usb\vid_045e&pid_0745&rev_0634&mi_01',
u'usb\root_hub20&vid8086&pid1e2d&rev0004',
u'usb\vid_2237&pid_4173&rev_0110',
u'usb\vid_12d1&pid_140c&rev_0000&mi_04',
u'usb\vid_045e&pid_0745&rev_0634&mi_02',
u'usb\vid_2232&pid_1028&rev_0003&mi_00',
u'usb\vid_8087&pid_0024&rev_0000',
u'usb\vid_12d1&pid_140c&rev_0000&mi_00',
u'usb\vid_12d1&pid_140c&rev_0000&mi_05',
u'usb\vid_2232&pid_1028&rev_0003',
u'usb\vid_0cf3&pid_3004&rev_0001',
u'usb\vid_12d1&pid_140c&rev_0000&mi_01',
u'usb\vid_8087&pid_0024&rev_0000',
u'usb\vid_12d1&pid_140c&rev_0000&mi_02',
u'usb\root_hub20&vid8086&pid1e26&rev0004',
u'usb\vid_12d1&pid_140c&rev_0000',
u'usb\vid_045e&pid_0745&rev_0634&mi_00',
u'usb\vid_045e&pid_0745&rev_0634',
u'usb\vid_12d1&pid_140c&rev_0000&mi_03']
Unable to get costless space for bulldoze: F
(21, 'GetDiskFreeSpaceEx', 'The device is not ready.')
Drives detected:
(0) G:\ ~ ?\STORAGE#VOLUME#_??USBSTOR#DISK&VEN_KOBO&PROD_EREADER-2.4.0&REV_0110#613A2A1023345&0#{53F56307-B6BF-11D0-94F2-00A0C91EFB8B}#{53F5630D-B6BF-11D0-94F2-00A0C91EFB8B}
(i) H:\ ~ ?\STORAGE#VOLUME#
??_USBSTOR#DISK&VEN_KOBO&PROD_EREADER-ii.iv.0&REV_0110#613A2A1023345&1#{53F56307-B6BF-11D0-94F2-00A0C91EFB8B}#{53F5630D-B6BF-11D0-94F2-00A0C91EFB8B}

Disabled plugins: KOBOTOUCHEXTENDED KOBOTOUCH

Looking for devices of type: MTP_DEVICE
List of WPD PNP ids:
[u'\?\wpdbusenumroot#umb#2&37c186b&0&storage#volume#_??usbstor#disk&ven_kobo&prod_ereader-2.four.0&rev_0110#613a2a1023345&0##{6ac27878-a6fa-4155-ba85-f98f491d4f33}',
u'\?\wpdbusenumroot#umb#ii&37c186b&0&storage#volume#
??usbstor#disk&ven_huawei&prod_sd_storage&rev_2.31#8&78b8636&0##{6ac27878-a6fa-4155-ba85-f98f491d4f33}',
u'\?\wpdbusenumroot#umb#ii&37c186b&0&storage#book#
??_usbstor#disk&ven_kobo&prod_ereader-two.iv.0&rev_0110#613a2a1023345&1##{6ac27878-a6fa-4155-ba85-f98f491d4f33}']
No suitable MTP devices constitute

Looking for devices...

Devices perhaps connected: None

Chapter display asking

Hi jgoguen
I don't know if information technology is possible or piece of cake to practise to ensure that the Chapter number as well a page is shown at foot of folio?
eg One volume shows "Chap V - PG. 35 OF 38" and another " PG. xv OF 33".
Get-go example "" class="calibre1"> Chapter 5 ""
2nd case ""course="calibre1"> ""
Could this be an enhancement?
Thanks Michael
Volition not allow me display line of html

After calibre 0.9.19 ready, kobo.x.ten ids are non added

Hi, after the changes caused past the update to calibre 0.ix.xix, information technology seems that html files are not parsed anymore. Neither class="koboSpan" nor id="kobo.x.x" get added, while the property to the cover image in the opf file is correctly added.

Provide debug option to save the modified kepub to to disk to allow an easier means of getting modified content

Missing texts from converted books

Kobo device removes ImageId on first restart

The first fourth dimension the Kobo sees a new volume, even with existing DB rows, it starts its usual processing and strips out series information and the paradigm ID. If there's a way to stop the Kobo from processing new files, it needs to be implemented and tested to make sure it doesn't break annihilation.

This is non considered to be a major issue since plugging the device into calibre and allowing it to update the metadata will set the series data and image ID and the Kobo device won't remove information technology over again.

If at that place is an exclamation mark in the book file name, the book cannot be opened.

If the title of an a book has an exclamation mark in information technology, and so the default save template mean the file name volition also have an exclamation marking. The device will process the book and add it to the library, merely when you endeavour to open information technology, in that location is a "cannot open" error. This was reported in http://www.mobileread.com/forums/showthread.php?p=2467473.

The exclamation mark doesn't cause a trouble in the file name for epubs.

Checking through calibre, there is callback "sanitize_path_components". Adding the following code to driver.py solves this:

                  def sanitize_path_components(self, components):     return [x.replace('!', '_') for x in components]                                  

I oasis't tested to see if at that place are other characters that cause issues.

"This volume tin't be opened"

I have a couple of books that, when transferred with the extended driver, can simply show the cover; when you endeavour to change page a popup comes upwards saying "This book can't be opened" (approximated translation). If I move the file out from the device and then manually in (and so that the database is purged from references to it) they work without problems.
I am also having another upshot with chapters that seem to open up in random lodge if I allow the driver to add references to them in the database, while they are read in order if no changes to the database are fabricated.
Is in that location whatsoever reason to add rows to the database relating to sigle chapters? I but see problems coming from this right now, but possibly it enables some feature I'one thousand not aware of.

DRM-burdened books should not get kepub extension

When adding the kepub extension to file names, a check needs to be done to ensure that DRM-encumbered books are non given the kepub extension.

kepub renderer does non work with URL-encoded file names

The kepub renderer fails when URL-encoded names are encountered. An update is necessary to ensure that file names are non URL-encoded in the TOC or the OPF file.

Possible rebuild of kepub structure and additional files needed

As reported by @mauriziofantino in issues #6, information technology may help with kepub compatibility if additional files are added to the kepub package. At that place is a CSS file, and a JavaScript file which seems to take a lot of processing for night/solar day mode, and bookmark locations.

Electric current hypenation option is non optimal

Current hypenation-related code, newly added, is probably overkill. I call back then since the reader'due south software already has support for hyphenation and internal dictionaries for (all? most? I don't know) languages that are supported for the user interface. Adding soft-hyphens complicates the interface and makes the epub file slightly heavier.
I suppose that the current approach would still be valid for unsupported languages, nonetheless, I think that if a dictionary for the language is available on the device, there should be a way for the reader to know what lexicon to utilize, like on original kepubs. I was planning to practice some inquiry on this topic sooner or after, but I wanted to know your stance on the subject area: mayhap you (@jgoguen) already made extensive research on this and concluded that the current way is the merely one, then close this as a wontfix, no problem with that.

Unable to send 5 to x% of books with 1.3.ii

Plugin version one.3.2
Calibre version : 0.9.31 64bit Windows
Kobo devices : Glo and Mini
Kobo Firmware : 2.5.ii

I have sent successfully more than 2000 books to my Kobos with the previous version of the plugin.
Trying to send again these books with the 1.3.2 version, many of them crash.
For some (about 10%), an epub to epub conversion with calibre solve the problem.
But for the others there'south a crash.
For the volume y'all can find hither : http://depositfiles.com/files/kmpqdeevk
The crash log is :

calibre, version 0.9.31
ERREUR : Erreur: Erreur pendant la advice avec le lecteur électronique

Failed to parse '[Bourbon Kid-i] Le Livre Sans Nom' past 'Anonyme' with mistake: 'this element does non have children or attributes' (file: calibre_plugins.kobotouch_extended.container, line: 492)

Traceback (most recent call last):
File "site-packages\calibre\gui2\device.py", line 85, in run
File "site-packages\calibre\gui2\device.py", line 557, in _upload_books
File "calibre_plugins.kobotouch_extended.commuter", line 259, in upload_books
InvalidEPub: Failed to parse '[Bourbon Kid-i] Le Livre Sans Nom' by 'Anonyme' with error: 'this element does not have children or attributes' (file: calibre_plugins.kobotouch_extended.container, line: 492)

The crash log is the aforementioned for many books, The merely change sometimes is line 490 or 492 in container.

I'm French the book too. Hope my English is non too bad. If you need more informations, ask me.
Thanks for your expert job.

Files not in OPF manifest may crusade parsing failures

Files detected during the Container initialization may not exist in the OPF manifest, which means they won't take an associated MIME type. This causes the files to be returned as raw unicode objects, causing parsing failures.

Syntax error

I (hopefully) followed the instructions to the letter, but can't get the plugin to install!
SyntaxError:invalid syntax (calibre_plugins.kobotouch_extended.init, line iv)

I am using calibre, version 0.9.18

Implement calibre-fashion byte string decoding

Kovid has pointed me at the calibre.ebooks.oeb.base.decode() method as an example of how to all-time decode files the same way calibre does. This method needs to exist copied and made to piece of work inside the existing Container class to ensure that files are handled as close to the same way equally calibre for best results.

Failed with error: 'this chemical element does not accept children or attributes'

Hey it'due south me again. I only wanted to restore my library on Kobo Glo after a factory reset. Now I am getting the error mentioned in championship on a epub file that was definitly sent successfully to device with a previous version of the driver.

Here is the calibre debug log ... hope this helps. ;)

calibre Debug log
calibre 0.9.30 isfrozen: True is64bit: False
Windows-7-6.1.7601-SP1 Windows ('32bit', 'WindowsPE')
('Windows', 'vii', '6.ane.7601')
Python 2.7.4
Windows: ('vii', '6.ane.7601', 'SP1', 'Multiprocessor Free')
Starting up...
Started up in ii.62 seconds with 234 books
Task: 1 Become device data started
DeviceJob: ane Get device information done, calling callback
DeviceJob: 1 Get device data callback returned
Job: 2 Get listing of books on device started
DEBUG: 0.0 KoboTouch:books - oncard='None'
DEBUG: 0.0 KoboTouch:books - oncard='None', prefix='I:'
DEBUG: 0.0 Kobo device: Kobo Glo
DEBUG: 0.0 Version of driver: (one, iii, ii) Has kepubs: True
DEBUG: 0.0 Version of firmware: (ii, 5, 2) Has kepubs: Truthful
DEBUG: 0.0 [u'series', True, True, True, False, True, Faux, False, Simulated, True, Simulated, u'', True, Simulated, False, Imitation, False, False, Imitation, False]
DEBUG: 0.0 KoboTouch:books - set_debugging_title to ''
DEBUG: 0.0 KoboTouch:books - length bl=0
DEBUG: 0.1 KoboTouch:books - length bl afterwards sync=15
DEBUG: 0.1 KoboTouch:books - reading device database
DEBUG: 0.1 Database Version=78
DEBUG: 0.1 KoboTouch:books - shelf listing: [u'Das Lied von Eis und Feuer', u'Ein Fall f\xfcr Carl G\xf8rck, Sonderdezernat Q', u'Shades of Grey', u'Robert Langdon']
DEBUG: 0.i KoboTouch:books - query= select Championship, Attribution, DateCreated, ContentID, MimeType, ContentType, ImageID, ReadStatus, ___ExpirationStatus, FavouritesIndex, Accessibility, IsDownloaded, Series, SeriesNumber, ___UserID from content where BookID is Nada and ((Accessibility = -1 and IsDownloaded in ('true', 1 )) or (Accessibility in (i,2) and IsDownloaded in ('true', i)) ) and non ((___ExpirationStatus=3 or ___ExpirationStatus is Zero) and ContentType = 6)
DEBUG: 0.1 KoboTouch:books - well-nigh to sync_booklists
DEBUG: 0.i USBMS: starting sync_booklists
DEBUG: 0.iii USBMS: finished sync_booklists
DEBUG: 0.iii KoboTouch:books - have done sync_booklists
DEBUG: 0.three KoboTouch:books - end - oncard='None'
DEBUG: 0.iii KoboTouch:books - oncard='carda'
DEBUG: 0.3 KoboTouch:books - Asked to process 'carda', simply do not have one!
DEBUG: 0.three KoboTouch:books - oncard='cardb'
DEBUG: 0.three KoboTouch:books - Asked to process 'cardb', simply do not have one!
DeviceJob: ii Get list of books on device done, calling callback
DeviceJob: 2 Go list of books on device callback returned
Job: 2 Go list of books on device finished
No details available.
Job: 1 Go device information finished
No details available.
Job: 3 Upload 1 books to device:Dice Herren von Winterfell started
Device using plugboard epub KOBOTOUCHEXTENDED None
Setting metadata in: Die Herren von Winterfell at: C:\Users\Manu\AppData\Local\Temp\calibre_3uz33c\gwlribcaltmpfmt.epub
DEBUG: 60.7 KoboTouchExtended:upload_books:Enabling actress ePub features for Kobo devices
DEBUG: 60.7 KoboTouchExtended:_modify_epub:Processing Die Herren von Winterfell
DEBUG: 60.seven KoboTouchExtended:_modify_epub:Failed conversions volition raise exceptions
Container:init:Got container path C:\Users\Manu\AppData\Local\Temp\calibre_3uz33c\hfu6th_kobo-driver-extended
DeviceJob: 3 Upload one books to device:Die Herren von Winterfell done, calling callback
Failed to parse 'Die Herren von Winterfell' by 'George R. R. Martin' with mistake: 'this element does not have children or attributes' (file: calibre_plugins.kobotouch_extended.container, line: 511)

Traceback (most recent call last):
File "site-packages\calibre\gui2\device.py", line 85, in run
File "site-packages\calibre\gui2\device.py", line 551, in _upload_books
File "calibre_plugins.kobotouch_extended.driver", line 259, in upload_books
InvalidEPub: Failed to parse 'Die Herren von Winterfell' by 'George R. R. Martin' with error: 'this chemical element does not have children or attributes' (file: calibre_plugins.kobotouch_extended.container, line: 511)

DeviceJob: 3 Upload ane books to device:Die Herren von Winterfell callback returned
Chore: 3 Upload 1 books to device:Die Herren von Winterfell finished
Failed to parse 'Die Herren von Winterfell' by 'George R. R. Martin' with error: 'this element does non take children or attributes' (file: calibre_plugins.kobotouch_extended.container, line: 511)

                  Traceback (most recent call final):   File "site-packages\calibre\gui2\device.py", line 85, in run   File "site-packages\calibre\gui2\device.py", line 551, in _upload_books   File "calibre_plugins.kobotouch_extended.driver", line 259, in upload_books InvalidEPub: Failed to parse 'Die Herren von Winterfell' by 'George R. R. Martin' with fault: 'this element does not have children or attributes' (file: calibre_plugins.kobotouch_extended.container, line: 511)                                  

Best regards,
SlimShady

Could not open up books with Kobo ii.5.i

Howdy there,

I did update my Kobo Glo to ii.5.1 a few days ago. I am using your extenden Kobo driver (one.2.seven) with Calibre 0.9.28. If I transport a book to the reader, everything works fine on Calibre-side. The *.kepub file is placed on the readers storage. Only if I try to open up the book on Kobo Glo I am getting an fault ("Oops! This certificate couldn't be opened - There might be a problem with the file..."). Do you know a set for this issue?

Best regards,
SlimShady0208

calibre 64bit Version: 0.9.nineteen nonetheless trouble.

Hi
Tried new zilch from github but still go error.
calibre, version 0.ix.nineteen
ERROR: Unhandled exception: ImportError:cannot import proper name KOBOTOUCHEXTENDED

Traceback (nigh recent call last):
File "site-packages\calibre\gui2\preferences\plugins.py", line 310, in add_plugin
File "site-packages\calibre\customize\ui.py", line 361, in add_plugin
File "site-packages\calibre\customize\ui.py", line 53, in load_plugin
File "site-packages\calibre\customize\zipplugin.py", line 167, in load
File "site-packages\calibre\customize\zipplugin.py", line 150, in load_module
File "calibre_plugins.kobotouch_extended.init", line 8, in
ImportError: cannot import proper name KOBOTOUCHEXTENDED
Any thoughts?
Thank you Michael

Having problems in my comments beingness accustomed and so edit first post
How-do-you-do
Seem to have problems in commenting tried 3 times.
Could not update via calibre and gained error message.
Followed your instructions and now have two.0.five installed.
Many thanks
Michael

calibre 64bit Version: 0.nine.19 problem.

When I upgraded to latest calibre 64bit
Version: 0.9.xix IT removed plugin and when I tried to load information technology got this mistake:
calibre, version 0.ix.nineteen
Mistake: Unhandled exception: ImportError:cannot import name KOBOTOUCHEXTENDED
Traceback (most recent phone call last):
File "site-packages\calibre\gui2\preferences\plugins.py", line 310, in add_plugin
File "site-packages\calibre\customize\ui.py", line 361, in add_plugin
File "site-packages\calibre\customize\ui.py", line 53, in load_plugin
File "site-packages\calibre\customize\zipplugin.py", line 167, in load
File "site-packages\calibre\customize\zipplugin.py", line 150, in load_module
File "calibre_plugins.kobotouch_extended.init", line eight, in
ImportError: cannot import name KOBOTOUCHEXTENDED
Went back to .18 no issues.
Whatsoever comment?
Thanks Michael

Consequence with HTML tags - fail to copy volume to device

Calibre version: 0.9.31-x64 (Windows)
Plugin version: ane.iii.ii
Device: Kobo Aureola Hard disk drive (firmware two.v.ii)

Tag combinations such as <p><b><br /></b></p> crusade the commuter to emit an fault.
I've created a new EPUB with Sigil and pasted this particular tag combination to isolate the result, this book is available to be sent if you so desire.

Please note that other combinations similar to this ane as well cause errors, if I encounter them again I'll be sure to mention them. They do seem to have in common that in that location's no text within the innermost tags and/or the unlike style of tag note: <tag> ... </tag> vs. <tag />.

Unable to set series data when adding a volume

Currently at that place is no way to add series information when adding a new book. Serial information is only added when re-connecting the Kobo device after the volume has been processed. Currently, the best hope for doing this is the EPUB3 support for a series title and index, per http://idpf.org/epub/30/spec/epub30-publications.html#sec-opf-dctitle. At this time, the Kobo devices do not parse the EPUB3 series information simply exercise parse the encompass data.

Can't install plug-in

Updated to Calibre 0.9.xix and downloaded files from here. When trying to install get this error:
calibre, version 0.9.19
ERROR: Unhandled exception: ImportError:cannot import name KOBOTOUCHEXTENDED

Traceback (nearly recent phone call last):
File "site-packages\calibre\gui2\preferences\plugins.py", line 310, in add_plugin
File "site-packages\calibre\customize\ui.py", line 361, in add_plugin
File "site-packages\calibre\customize\ui.py", line 53, in load_plugin
File "site-packages\calibre\customize\zipplugin.py", line 167, in load
File "site-packages\calibre\customize\zipplugin.py", line 150, in load_module
File "calibre_plugins.kobotouch_extended.init", line 8, in
ImportError: cannot import proper noun KOBOTOUCHEXTENDED

hyphenation problem

My books are in french. Hyphenation employ the wrong dictionnary in every case. Even if i force with calibre (0.9.23) xml:lang="fr" :
html, body {
widows: 0;
orphans: 0;
padding: 0;
margin: 0;
summit: 100%;
xml:lang="fr";
}
The convertion in kepub when open with sigil, make announced xml:lang="en" ; making probably use of the wrong hyphenation dictionary in the kobo.
If i edit with sigil the book with xml:lang="fr", i accept a issues in the kobo with sometimes a abuse of the db, with a reinitialisation of the firmware mandatory. But even if i substitute the english lexicon with the french 1 in a KoboRoot.tgz : the wrong hyphenation announced...

Image IDs are unconditionally added

It's possible to tell Calibre not to send images to the device. If images are not to be sent, the ImageId field should not exist ready and sync_booklists should not endeavor to update image IDs.

Mistake in the extended Kobo driver while modifying the epub to exist a kepub.

Hello,
First of all, my thanks for this nice and very useful plugin.

I've posted this upshot on Mobileread : http://world wide web.mobileread.com/forums/showthread.php?t=210894, thinking that it is Calibre's effect.
I got this answer from davidfor : "That is an mistake in the extended Kobo driver while modifying the epub to be a kepub. The author usually asks for problems to be posted on https://github.com/jgoguen/calibre-kobo-driver. He'll probably need to see the file that is causing the problem".

I'm running on Windows 7 32b.
Here is my trouble with Calibre : I'm unable to re-add together 2 epubs to my Kobo Glo (which had once been added - before the installation of the plugin- and so removed from Kobo)

calibre, version 0.nine.27
ERREUR : Erreur: Erreur pendant la communication avec le lecteur électronique (= Fault communicating with device)

Failed to parse: 'Xxx' with mistake: 'NoneType' object has no aspect 'remove'

Traceback (most recent call last):
File "site-packages\calibre\gui2\device.py", line 85, in run
File "site-packages\calibre\gui2\device.py", line 551, in _upload_books
File "calibre_plugins.kobotouch_extended.driver", line 260, in upload_books
ParseError: Failed to parse: '30' with error: 'NoneType' object has no aspect 'remove'

I would like to attach the troublesome epub, but I do not know how to practice it.
Thank you for your help.
Regards.

ZIP does non support timestamps before 1980

calibre, version 0.9.17
ERRORE: Errore: Errore di comunicazione col dispositivo

ZIP does not support timestamps before 1980

Traceback (most recent call terminal):
File "site-packages/calibre/gui2/device.py", line 85, in run
File "site-packages/calibre/gui2/device.py", line 551, in _upload_books
File "calibre_plugins.kobotouch_extended.driver", line 183, in upload_books
File "calibre_plugins.kobotouch_extended.driver", line 173, in _modify_epub
File "calibre_plugins.kobotouch_extended.container", line 125, in write
File "zipfile.py", line 1045, in write
File "zipfile.py", line 295, in init
ValueError: Zip does non support timestamps earlier 1980

I'thousand sending an affected file.
no-database branch.

Series data is always set

The driver always sets series information in the database fifty-fifty if the option to fix series information is disabled.

Boosted Kobo bridge tags needed

From http://www.mobileread.com/forums/showpost.php?p=2482479&postcount=202

Sorry, I meant to say "further kobo id bridge tags (span id="kobo.1.1" and so on)." For case, if a chapter is so long that it results in a certain screen folio having no opening kobo bridge tag and you happen to close the book on this screen page, the book volition not reopen at the correct screen page. Every bit yous might have noticed. in the preview kepubs from Kobo (and I therefore suppose also in the regular Kobo kepubs), they put a kobo bridge tag also in between sentences (with increasing second alphabetize number); in some books they additionally match each font attribute tag with a kobo span tag. Since the screen page breaks are depending on customizable values like font attributes, margins so on, even those measures (namely, farther kobo span tags) will not forestall kobo-span-tag-less screen pages in every possible example, or i will end finally putting kobo tags around each single alphabetic character.

The other problem I had was with ranges of text that were not at all covered by kobo bridge tags, as for example tables and lists. This was of course my mistake, since I did not call up of those example at all to start with.

I practice non know about your plug-in (and I do not know whether calibre changes tables and listing to another constructions), just judging from your description earlier in this thread your plug-in might be prone to these problems too.

Batch processing improvement

Please it is possible to make Kobo-driver-extended to process each ebook in a batch separately? And then if one of them is bad-coded will not preclude the other ebooks to be converted and copied in the reader.

Or another option could be to brand the mistake message to brandish the name of the ebook that contains the mistake, so it's easier to notice it.

Thank you

Smarten the punctuation (enhancement)

Can yous add together a the smart punctuation to the extended menu?
I know information technology'due south a standard feature already implemented in Calibre simply I don't similar using the standard Conversion option as information technology does "Calibresizes" the output epub with lots of calibre tags that are in mho mostly unnecessary or at least unwanted by me.

To smarten the punctuation of an epub I currently use the "Modify epub" plugin that does this without converting the epub (similar Calibre does). This plugin seems to use (phone call) the default Calibre smarten punctuation routines.

So if you tin add the default smarten punctuation routine to your plugin in some future release the whole conversion to kepub can be done in one go.
Just do focus starting time on more important features or bugs that need the fixed or improved first.

Can't install KTEP

I can't install the Kobo ExtendedPlugin

Plugin error log
Calibre, version 0.9.27 / Windows viii Pro

FOUT: Niet afgehandelde fout: SyntaxError:invalid syntax (calibre_plugins.kobotouch_extended.init, line four)

Traceback (most contempo call terminal):
File "site-packages\calibre\gui2\preferences\plugins.py", line 310, in add_plugin
File "site-packages\calibre\customize\ui.py", line 361, in add_plugin
File "site-packages\calibre\customize\ui.py", line 53, in load_plugin
File "site-packages\calibre\customize\zipplugin.py", line 169, in load
File "importlib__init__.py", line 37, in import_module
File "site-packages\calibre\customize\zipplugin.py", line 147, in load_module
File "calibre_plugins.kobotouch_extended.init", line 4

^
SyntaxError: invalid syntax

Total log
calibre Debuglog
calibre 0.9.27 [64bit] isfrozen: True is64bit: True
Windows-post2008Server-6.two.9200 Windows ('64bit', 'WindowsPE')
('Windows', 'post2008Server', '6.2.9200')
Python 2.seven.3
Windows: ('post2008Server', '6.two.9200', '', 'Multiprocessor Free')
Starting up...
Chore: one Lees apparaatinformatie started
DeviceJob: one Lees apparaatinformatie done, calling callback
DeviceJob: ane Lees apparaatinformatie callback returned
Chore: 2 Lees boekenlijst van apparaat started
DEBUG: 0.0 KoboTouch:books - oncard='None'
DEBUG: 0.0 KoboTouch:books - prefix='None'
DEBUG: 0.0 Version of driver: (2, 0, 7) Has kepubs: Truthful
DEBUG: 0.0 Version of firmware: 2.4.0 Has kepubs: True
DEBUG: 0.0 [u'', False, False, False, Imitation, Fake, Fake, False, Faux, False, False, u'']
DEBUG: 0.0 KoboTouch:books - set_debugging_title to
DEBUG: 0.0 KoboTouch:books - length bl=0
DEBUG: 0.2 KoboTouch:books - length bl later sync=168
DEBUG: 0.2 KoboTouch:books - reading device database
DEBUG: 0.2 Database Version=71
DEBUG: 0.2 KoboTouch:books - shelf list: [u'Wishlist', u'Business organization / Management', u'Non-fictie', u'Thiller']
DEBUG: 0.ii KoboTouch:books - query= select Title, Attribution, DateCreated, ContentID, MimeType, ContentType, ImageID, ReadStatus, ___ExpirationStatus, FavouritesIndex, Accessibility, IsDownloaded, Serial, SeriesNumber, ___UserID from content where BookID is Zero and ((Accessibility = -1 and IsDownloaded in ('true', 1)) or (Accessibility in (1,2)) ) and not ((___ExpirationStatus=3 or _ExpirationStatus is Nothing) )
DEBUG: 0.two KoboTouch:books - looping on database - row=9
DEBUG: 0.2 KoboTouch:books - title='' authors= Kobo Inc.
DEBUG: 0.2 KoboTouch:books - row= (u'', u'Kobo Inc.', None, u'file:///usr/local/Kobo/assist/10UserGuide-Legal.kepub.epub', u'application/x-kobo-epub+zip', u'half dozen', None, 0, 0, -1, 1, 1, None, None, u'')
DEBUG: 0.2 KoboTouch:books - looping on database - row=10
DEBUG: 0.ii KoboTouch:books - championship='' authors= Kobo Inc.
DEBUG: 0.2 KoboTouch:books - row= (u'', u'Kobo Inc.', None, u'file:///usr/local/Kobo/help/09UserGuide-Contacting_FNAC.kepub.epub', u'application/x-kobo-epub+nada', u'vi', None, 0, 0, -1, i, 1, None, None, u'')
DEBUG: 0.4 KoboTouch:imagefilename_from_imageID - no cover paradigm found - ImageID=
DEBUG: 0.v KoboTouch:imagefilename_from_imageID - no encompass image found - ImageID=
Job: 1 Lees apparaatinformatie finished
Geen details beschikbaar.
DEBUG: 1.1 KoboTouch:books - nigh to sync_booklists
DEBUG: 1.one USBMS: starting sync_booklists
DEBUG: 1.3 USBMS: finished sync_booklists
DEBUG: 1.three KoboTouch:books - take done sync_booklists
DEBUG: 1.iii KoboTouch:books - end - oncard='None'
DEBUG: 1.3 KoboTouch:books - oncard='carda'
DEBUG: i.3 KoboTouch:books - Asked to process 'carda', just exercise not take ane!
DEBUG: 1.3 KoboTouch:books - oncard='cardb'
DEBUG: 1.iii KoboTouch:books - Asked to procedure 'cardb', but do not have one!
DeviceJob: two Lees boekenlijst van apparaat done, calling callback
DeviceJob: 2 Lees boekenlijst van apparaat callback returned
Job: 2 Lees boekenlijst van apparaat finished
Geen details beschikbaar.
Started upwardly in xxx.58 seconds with 4 books
Traceback (most recent call last):
File "site-packages\calibre\gui2\preferences\plugins.py", line 310, in add_plugin
File "site-packages\calibre\customize\ui.py", line 361, in add_plugin
File "site-packages\calibre\customize\ui.py", line 53, in load_plugin
File "site-packages\calibre\customize\zipplugin.py", line 169, in load
File "importlib__init
.py", line 37, in import_module
File "site-packages\calibre\customize\zipplugin.py", line 147, in load_module
File "calibre_plugins.kobotouch_extended.init", line four

^
SyntaxError: invalid syntax

No more paradigm cover afterwards 2000 books sent to Kobo

Calibre : 0.9.31
Plugin : Final version posted on GitHub (after correction bug #46)
Kobo Mini : 2.v.ii

No more crash when sendig books since bug #46 has been corrected.
Continuing to ship books 200 by 200.
Afterwards 2000 books sent, no more image cover announced on home page or library list.
Choosing other books to transfer does not solve this.

Error communicating with device / transfer

This would exist on calibre 0.9.20, device is a Kobo Glo, on connexion or transfer:

ERROR: Error: Error communicating with device
no such table: content
Traceback (most recent call last):
File "site-packages/calibre/gui2/device.py", line 85, in run
File "site-packages/calibre/gui2/device.py", line 500, in _sync_booklists
File "calibre_plugins.kobotouch_extended.driver", line 248, in sync_booklists
OperationalError: no such tabular array: content

No issues with the vanilla plugin.

Issue with bookmark and notation, and volume cover

Kobo Glo - ver.two.4.0
Calibre - ver.0.9.23
KoboTouchExtended - ver.2.0.7

I had disable all the device interface plugins and only KoboTouchExtended is enable. Then I had selected send book to device main retentiveness. The book is renamed with the extension .kepub.epub.

The book encompass do not appear at first, but subsequently I had transferred another book to device, information technology show out. Simply the latest volume do not has the cover.

For the notation - Endeavor highlight, add note or bookmark. Neither information is saved. The sentence/word not highlighted, the folio is bookmarked, and the note is added. When relaunch the volume, will proceed dorsum to the kickoff page of the latest chapter.

I had checked the html file, the id attribute kobo.X.1 is not in h1-6 and p tags.

I really annoyed with the rendering engine between epub and kepub.epub. Hopefully you able to resolve our problems and save our day.

Cheers alot!

JS file

I thing I have wondered.... Have you lot considered having people download a "free" Kobo eBook, and then having the plugin extract the js file from it, and add it into the books you lot convert?

That way y'all are non distributing the file, yous are merely providing a tool that permits the user to extract the file and add it to their books?

Plugin Fails to Transport CBZ/CBR Files to Device

From http://www.mobileread.com/forums/showpost.php?p=2482885&postcount=205

The plugin currently chokes when trying to send CBR/CBZ files to the Kobo Glo; it "successfully" sends the files to the Kobo Glo without actually sending the files. Plugin should check the blazon of file being sent and perform the extended features operations just on files that might support it (.epub, others such equally .mobi?).

Removal of white spaces before html markup tags (#32)

Reopening issues #32 (removal of white spaces earlier html markup tags). The bug is still there. If simply the option "enable extended features" is selected. Simply but to Kobofy a book.

At least for "i", "em", "b", "strong", "small" tags, if these tags are preceded with a white infinite. This only applies to the commencement occurrence in a sentence.

"Hello world
"Helloworld ("earth" is italicized, space removed earlier earth)

You may check this too for "span class" tags.
Edit: "span" tags seems to be O.M.
Is it achievable to temporary rename trouble tags to span classes? And when the Kobfication has been washed reverse it? Or add the new created bridge classes to the css?
E.g:
"i" becomes "span course="italic"
"b" becomes "span class="bold"
"modest" becomes "bridge class="modest-caps"
etc.

Possible style to apply Kobo.js and Kobo.css

Citing from Project Gutenberg license, section 1.E:
1.E. Unless you take removed all references to Project Gutenberg:

1.Due east.one. The following sentence, with active links to, or other immediate access to, the total Project Gutenberg-tm License must announced prominently whenever any re-create of a Project Gutenberg-tm piece of work (any work on which the phrase "Project Gutenberg" appears, or with which the phrase "Project Gutenberg" is associated) is accessed, displayed, performed, viewed, copied or distributed:

This eBook is for the use of anyone anywhere at no cost and with almost no restrictions whatsoever. You may copy it, give it away or re-use it nether the terms of the Project Gutenberg License included with this eBook or online at www.gutenberg.org

1.East.ii. If an individual Project Gutenberg-tm electronic work is derived from the public domain (does non contain a notice indicating that it is posted with permission of the copyright holder), the work can exist copied and distributed to anyone in the Usa without paying any fees or charges. If yous are redistributing or providing access to a work with the phrase "Projection Gutenberg" associated with or appearing on the work, you must comply either with the requirements of paragraphs ane.Due east.i through i.E.seven or obtain permission for the use of the work and the Project Gutenberg-tm trademark as prepare forth in paragraphs one.Eastward.viii or 1.Eastward.9.

In every Kobo there's at least a kepub, called 6aca459b-396c-4a15-bced-77722c5d6012, that is derived from a Projection Gutenberg work and maintains reference to the projection; so this license utilize. This Kepub contains the much needed js code and so this license should use to it as well. I don't know if this license is compatible with the GPLv3 simply I think this is worth to investigate.

version ane.iii.1 of driver not sending known adept books to device

  • Latest version of Calibre (0.9.30)
  • Latest version of plugin (1.three.one)
  • Kobo Glo fw 2.5.two
  • Error message:
    calibre, version 0.9.thirty
    Fault: Error: Mistake communicating with device

Failed to parse 'Plato and a Platypus Walk Into a Bar...' by 'Thomas Cathcart' with error: 'character mapping must render integer, None or unicode' (file: calibre_plugins.kobotouch_extended.container, line: 74)

Traceback (most recent call concluding):
File "site-packages\calibre\gui2\device.py", line 85, in run
File "site-packages\calibre\gui2\device.py", line 551, in _upload_books
File "calibre_plugins.kobotouch_extended.driver", line 286, in upload_books
InvalidEPub: Failed to parse 'Plato and a Platypus Walk Into a Bar...' by 'Thomas Cathcart' with error: 'character mapping must render integer, None or unicode' (file: calibre_plugins.kobotouch_extended.container, line: 74)

  • Copy of the Calibre debug log:
                  calibre Debug log calibre 0.9.thirty [64bit]  isfrozen: Truthful is64bit: Truthful Windows-seven-6.1.7601-SP1 Windows ('64bit', 'WindowsPE') ('Windows', 'vii', 'six.one.7601') Python 2.7.4 Windows: ('7', 'six.1.7601', 'SP1', 'Multiprocessor Costless') Starting upward... Job: i Get device information started DeviceJob: one Go device information washed, calling callback DeviceJob: 1 Get device information callback returned Job: 2 Get listing of books on device started DEBUG:    0.0 KoboTouch:books - oncard='None' DEBUG:    0.0 KoboTouch:books - oncard='None', prefix='G:\' DEBUG:    0.0 Kobo device: Kobo Glo DEBUG:    0.0 Version of driver: (1, iii, ane) Has kepubs: True DEBUG:    0.0 Version of firmware: (2, 5, 2) Has kepubs: True DEBUG:    0.ane [u'#myshelves', True, True, False, False, False, False, Faux, Faux, Truthful, True, u'', Truthful, Faux, Simulated, False, Simulated, False, False, False] DEBUG:    0.1 KoboTouch:books - set_debugging_title to '' DEBUG:    0.1 KoboTouch:books - length bl=0 DEBUG:    0.ii KoboTouch:books - length bl after sync=10 DEBUG:    0.2 KoboTouch:books - reading device database DEBUG:    0.iii Database Version=78  #Removed shelf information   Job: ane Get device information finished No details bachelor. DEBUG:    six.3 KoboTouch:books - automatically managing metadata DEBUG:    half-dozen.three KoboTouch:books - about to sync_booklists DEBUG:    6.3 USBMS: starting sync_booklists DEBUG:    6.4 USBMS: finished sync_booklists DEBUG:    6.4 KoboTouch:books - have done sync_booklists DEBUG:    6.iv KoboTouch:books - end - oncard='None' DEBUG:    6.4 KoboTouch:books - oncard='carda' DEBUG:    6.4 KoboTouch:books - oncard='carda', prefix='H:\' DEBUG:    half-dozen.4 Kobo device: Kobo Glo DEBUG:    half-dozen.iv Version of driver: (1, 3, 1) Has kepubs: True DEBUG:    half-dozen.4 Version of firmware: (2, 5, 2) Has kepubs: True DEBUG:    6.4 [u'#myshelves', True, True, False, False, False, False, False, False, True, True, u'', Truthful, False, Faux, Simulated, Faux, False, False, Imitation] DEBUG:    vi.4 KoboTouch:books - set_debugging_title to '' DEBUG:    6.4 KoboTouch:books - length bl=0 DEBUG:    eight.nine KoboTouch:books - length bl after sync=307 DEBUG:    8.9 KoboTouch:books - reading device database DEBUG:    8.9 Database Version=78  #Removed shelf data   Started upwardly in 36.98 seconds with 352 books DEBUG:   12.7 KoboTouch:books - automatically managing metadata DEBUG:   12.vii KoboTouch:books - about to sync_booklists DEBUG:   12.7 USBMS: starting sync_booklists DEBUG:   13.0 USBMS: finished sync_booklists DEBUG:   13.1 KoboTouch:books - have washed sync_booklists DEBUG:   thirteen.1 KoboTouch:books - end - oncard='carda' DEBUG:   13.1 KoboTouch:books - oncard='cardb' DEBUG:   13.1 KoboTouch:books - Asked to process 'cardb', merely practice not take ane! DeviceJob: 2 Become listing of books on device done, calling callback DeviceJob: two Get list of books on device callback returned Job: iii Send metadata to device started DEBUG:   13.4 KoboTouchExtended:sync_booklists:Setting ImageId fields Job: 2 Get list of books on device finished No details available. DEBUG:   xl.5 KoboTouchExtended:sync_booklists:done setting ImageId fields DEBUG:   40.five KOBO: started sync_booklists DEBUG:   xl.v KoboTouch:update_device_database_collections - oncard='main' DEBUG:   xl.5 KoboTouch:update_device_database_collections - set_debugging_title to '' DEBUG:   xl.5 KTCollectionsBookList:get_collections - offset - collection_attributes= [u'#myshelves'] DEBUG:   40.5 KTCollectionsBookList:get_collections - collection_attributes= [u'#myshelves'] DEBUG:   twoscore.5 KTCollectionsBookList:get_collections - end DEBUG:   41.0 KoboTouch:update_device_database_collections - category='Finished' books=v DEBUG:   41.one KoboTouch:update_device_database_collections - end for category='Finished' DEBUG:   41.1 KoboTouch:update_device_database_collections - managing bookshelves and series. DEBUG:   41.i KoboTouch:update_device_database_collections - about to articulate empty bookshelves DEBUG:   41.1 KoboTouch:delete_empty_bookshelves - get-go DEBUG:   41.ane KoboTouch:delete_empty_bookshelves - terminate DEBUG:   41.1 KoboTouch:update_device_database_collections - Number of series set=0 Number of books=v DEBUG:   41.1 KoboTouch:update_device_database_collections - Finished  DEBUG:   41.1 KoboTouch:update_device_database_collections - oncard='carda' DEBUG:   41.two KoboTouch:update_device_database_collections - set_debugging_title to ''  #removed shelf information   DEBUG:   53.seven KoboTouch:update_device_database_collections - Number of serial ready=0 Number of books=307 DEBUG:   53.7 KoboTouch:update_device_database_collections - Finished  DEBUG:   53.7 USBMS: starting sync_booklists DEBUG:   54.1 USBMS: finished sync_booklists DEBUG:   54.1 KOBO: finished sync_booklists DeviceJob: iii Send metadata to device done, calling callback DeviceJob: three Transport metadata to device callback returned Job: four Upload 1 books to device:Plato and a Platypus Walk Into a Bar... started Device using plugboard epub KOBOTOUCHEXTENDED [[u'{series:re(([^\\due south])[^\\s]+(\\s|$),\\one)}{series_index:0>2s| - | - }{title}', u'title']] Setting metadata in: Plato and a Platypus Walk Into a Bar... at: C:\Users\MB\AppData\Local\Temp\calibre_ue6w3g\remk_fcaltmpfmt.epub DEBUG:   54.ii KoboTouchExtended:upload_books:Enabling actress ePub features for Kobo devices DEBUG:   54.2 KoboTouchExtended:_modify_epub:Processing Plato and a Platypus Walk Into a Bar... DEBUG:   54.ii KoboTouchExtended:_modify_epub:Failed conversions will raise exceptions DeviceJob: four Upload ane books to device:Plato and a Platypus Walk Into a Bar... done, calling callback Failed to parse 'Plato and a Platypus Walk Into a Bar...' past 'Thomas Cathcart' with error: 'character mapping must return integer, None or unicode' (file: calibre_plugins.kobotouch_extended.container, line: 74)  Traceback (most recent phone call last):   File "site-packages\calibre\gui2\device.py", line 85, in run   File "site-packages\calibre\gui2\device.py", line 551, in _upload_books   File "calibre_plugins.kobotouch_extended.driver", line 286, in upload_books InvalidEPub: Failed to parse 'Plato and a Platypus Walk Into a Bar...' by 'Thomas Cathcart' with error: 'graphic symbol mapping must return integer, None or unicode' (file: calibre_plugins.kobotouch_extended.container, line: 74)  DeviceJob: 4 Upload i books to device:Plato and a Platypus Walk Into a Bar... callback returned Job: iv Upload 1 books to device:Plato and a Platypus Walk Into a Bar... finished Failed to parse 'Plato and a Platypus Walk Into a Bar...' past 'Thomas Cathcart' with fault: 'grapheme mapping must render integer, None or unicode' (file: calibre_plugins.kobotouch_extended.container, line: 74)      Traceback (most recent call last):       File "site-packages\calibre\gui2\device.py", line 85, in run       File "site-packages\calibre\gui2\device.py", line 551, in _upload_books       File "calibre_plugins.kobotouch_extended.driver", line 286, in upload_books     InvalidEPub: Failed to parse 'Plato and a Platypus Walk Into a Bar...' by 'Thomas Cathcart' with error: 'graphic symbol mapping must return integer, None or unicode' (file: calibre_plugins.kobotouch_extended.container, line: 74)  Job: 3 Send metadata to device finished No details available.                                  

Trouble with pages and annotations

I merely tried your calibre-kobo-driver and installing/configuring was no problem. And then I tried it with some books which I own as epub. First, there was no obvious problem just after going back to the home screen and re-opening the volume, it started at a different folio. Please annotation that this problem didn't occur with the original epubs nor with other "existent" kepubs from Kobo. Also, the Kobo had problems with bookmarks I added to these transformed kepubs. It opened a different folio - not that one were I added the bookmark.

I tried it with Calibre 0.ix.19 and the latest calibre-kobo-commuter (terminal commit from Mon Feb 18 22:24:43 2013). Kobo firmware is 2.3.1.

Problems in commenting

Hi Every fourth dimension I comment it deletes so simply way is to showtime new thread.
Hi
Seem to have problems in commenting tried 3 times.
Every time I press comment information technology goes blank! then only way to send was a new issue
Could non update via calibre and gained fault bulletin.
Followed your instructions and now have two.0.five installed.
Many thank you
Michael

Just set ImageID field for books in the electric current calibre library

Currently the driver fetches all database rows with a null ImageID. Simply books that are really in the current calibre library should be modified.

Optimize Kobo span generation

The Kobo span tags are added far more than frequently than necessary. Use recently published KePub files to determine where spans can be skipped. Some quick targets:

  • Do non separate on punctuation other than total-cease characters
  • It may not be necessary to descend into children of content nodes (b, i, em, etc.)

Code contains copy of options from KoboTouch Driver

I am about to make 2 changes to the KoboTouch driver that mean changes to the options. Both changes will rename and slightly repurpose two options. No extra options will exist added. At the moment.

Considering this driver has copied the EXTRA_CUSTOMIZATION_MESSAGE and EXTRA_CUSTOMIZATION_DEFAULT structures and extended them, the options volition get out of sync. I propose changing the code to copy the values at runt fourth dimension.

The following seems to piece of work:

                                      EXTRA_CUSTOMIZATION_DEFAULT = KOBOTOUCH.EXTRA_CUSTOMIZATION_DEFAULT     EXTRA_CUSTOMIZATION_MESSAGE = KOBOTOUCH.EXTRA_CUSTOMIZATION_MESSAGE     EXTRA_CUSTOMIZATION_MESSAGE_SIZE = len(EXTRA_CUSTOMIZATION_MESSAGE)      EXTRA_CUSTOMIZATION_MESSAGE.append(_('Enable Extended Features') + \             ':::' + _('Cull whether to enable extra customisations'))     EXTRA_CUSTOMIZATION_DEFAULT.suspend(True)     OPT_EXTRA_FEATURES = EXTRA_CUSTOMIZATION_MESSAGE_SIZE      EXTRA_CUSTOMIZATION_MESSAGE.append(_('Delete Files not in Manifest') + \             ':::' + _('Select this to silently delete files that are not in the manifest if they are encountered during processing. '                 'If this option is not selected, files non in the manifest will be silently added to the manifest and candy as if they ever were in the manifest.'))     EXTRA_CUSTOMIZATION_DEFAULT.append(Imitation)     OPT_DELETE_UNMANIFESTED = EXTRA_CUSTOMIZATION_MESSAGE_SIZE + 1      EXTRA_CUSTOMIZATION_MESSAGE.append(_('Upload DRM-encumbered ePub files') + \             ':::' + _('Select this to upload ePub files encumbered by DRM. If this is not selected, it is a fatal fault to upload an burdened file'))     EXTRA_CUSTOMIZATION_DEFAULT.append(False)     OPT_UPLOAD_ENCUMBERED   = EXTRA_CUSTOMIZATION_MESSAGE_SIZE + 2      EXTRA_CUSTOMIZATION_MESSAGE.append(_('Silently Ignore Failed Conversions') + \             ':::' + _('Select this to non upload any book that fails conversion to kepub. If this is not selected, the upload process '                 'will be stopped at the start book that fails. If this is selected, failed books will be silently removed from the upload queue.'))     EXTRA_CUSTOMIZATION_DEFAULT.suspend(False)     OPT_SKIP_FAILED         = EXTRA_CUSTOMIZATION_MESSAGE_SIZE + 3      EXTRA_CUSTOMIZATION_MESSAGE.suspend(_('Hyphenate Files') + \             ':::' + _('Select this to add soft hyphens to uploaded ePub files. The language used volition be the language divers for the book in calibre. '                 ' Information technology is necessary to accept a LibreOffice/OpenOffice hyphenation dictionary in ' + os.path.join(config_dir, 'plugins', 'KoboTouchExtended') + \                 ' named like hyph_{language}.dic, where {language} is the ISO 639 3-letter language code. For example, \'eng\' but not \'en_CA\'. The default dictionary to use '                 ' if none is constitute may be named \'hyph.dic\' instead.'))     EXTRA_CUSTOMIZATION_DEFAULT.append(False)     OPT_HYPHENATE           = EXTRA_CUSTOMIZATION_MESSAGE_SIZE + iii      EXTRA_CUSTOMIZATION_MESSAGE.append(_('Replace Content Language Code') + \             ':::' + _('Select this to replace the defined linguistic communication in each content file inside the ePub.'))     EXTRA_CUSTOMIZATION_DEFAULT.append(Simulated)     OPT_REPLACE_LANG        = EXTRA_CUSTOMIZATION_MESSAGE_SIZE + iv                                  

I haven't done a lot of testing. Just enough to prove it displays and changes the options correctly. Plus sent a couple of books with the "extended" option on and off.

I don't know if the above is the best mode to do this. If there is a better way that needs a alter in the KoboTouch commuter, tell me and I'll look at information technology.

Disappearing white space if the first html-codetag is preceded with a (white space)

Besides posted this pocket-size just inconvenient problems on MobileRead (http://www.mobileread.com/forums/showpost.php?p=2482711&postcount=203)
In that location you'll find the original epub and kobofied kepub.

Brusk description here:
Later kobofying an epub there is a problems if the get-go HTML-tag/code within the span class="koboSpan" is preceded with a white space. After kobofication this preceding white space is removed. White spaces preceding all following HTML-codes within the "koboSpan" course are honored.

Original epub examination (excerpt)
`

Moody's plaatst vraagtekens bij waardering*DE

Het bod van*JAB waardeert DEMB in totaal op vii,5 miljard euro.`

the * marks a white space that precedes the and

html-codetags.
These marked white spaces disappeare in the kobofied kepub.

Kobofied kepub conversion (extract):
`

Moody'south plaatst vraagtekens bij waarderingDE

Het bod vanJAB waardeert DEMB in totaal op 7,5 miljard euro.`

As said before this merely happens when a white space precedes the kickoff html-code/tag within the "koboSpan" grade. No other spaces or characters are removed.

Hyphenation issue

Hi

I was testing the new hyphenation characteristic, I installed the italian hyphen dictionary as explained in the readme, so tried to upload several ebooks, only with hyphenation characteristic ON this is the resulting visualization on my Glo:
eruge6u6

This is the same ebook transferred on kobo with hyphenation feature OFF
tuba3uva

I tried on my Glo (Fw 2.five.0) and on my wife's Glo (Fw 2.4.0) and the event is the aforementioned.

Give thanks y'all

book loop back at the end of chapter

Hello jgoguen,

first of all let me say smashing task! I opened this issue crusade I am having some trouble in the majority of the books (not all but with just ane at the moment I do not take problem) I upload with your extended module. In practice I am ever stuck at the encompass folio in one case I open a book. I tin can read the book by using the toc jumping on a specific chapter, just when I reach its end i loop back to the cover folio and again the only way to get rid of it is to apply pass through the table of content.

Some other thing I wanted to say is related to the trouble of the bookmarks. With the last firmware upgrade many people have exerienced the trouble of the bookmarks. A possible solution is to set the margin size to nothing. Indeed all the original kepub I take taken from my kobo has the margin size set to zero.

Some other annotate is on the kobo tags which are added. I take noticed that your plugin as well as the suggestions of dsandrei in his blog adds just the hash tag kobo.ten.y, while I have noticed that in the original kepub the string is more complex and appear in the grade of: . I have no idea if the course="KoboSpan" has any upshot on the file.

Thanks for your work and allow me know if I can help you somehow!

Maurizio.

Error in parsing some books

I become this error with most of my books:

'utf8' codec can't decode byte 0xc3 in position 51145: unexpected end of data

Traceback (most recent telephone call terminal):
File "site-packages/calibre/gui2/device.py", line 85, in run
File "site-packages/calibre/gui2/device.py", line 551, in _upload_books
File "calibre_plugins.kobotouch_extended.driver", line 187, in upload_books
File "calibre_plugins.kobotouch_extended.driver", line 148, in _modify_epub
File "calibre_plugins.kobotouch_extended.container", line 77, in get_parsed
File "site-packages/calibre/ebooks/chardet.py", line thirty, in strip_encoding_declarations
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc3 in position 51145: unexpected end of data

Of course the byte value and position varies with files. Some of them are actually working fine.

Metadata update fails if too many books in Kobo

Calibre : 0.9.31
Plugin : ane.3.3
Kobo : ii.5.ii

I have more than than 4000 books on my Kobo.
I sent them 500 by 500.
Since near 3000, the update of metadata footstep, afterwards books transfer, fails :

calibre, version 0.9.31
ERREUR : Erreur: Erreur pendant la communication avec le lecteur électronique

besides many SQL variables

Traceback (well-nigh recent call last):
File "site-packages\calibre\gui2\device.py", line 85, in run
File "site-packages\calibre\gui2\device.py", line 506, in _sync_booklists
File "calibre_plugins.kobotouch_extended.driver", line 347, in sync_booklists
File "calibre_plugins.kobotouch_extended.driver", line 342, in _rows_needing_imageid
OperationalError: likewise many SQL variables

kozlowskilovid1985.blogspot.com

Source: https://githubhelp.com/jgoguen/calibre-kobo-driver

Post a Comment for "Can Kobo Clara Read Barnes and Noble Books"