Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 04-19-2013, 08:09 PM   #1
jgoguen
Generally Awesome Person
jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.
 
Posts: 657
Karma: 2018502
Join Date: Jan 2013
Location: San Francisco Bay Area
Device: Kindle Paperwhite 2
[Device Plugin] Kobo Touch Extended Driver

THIS PLUGIN IS NO LONGER BEING DEVELOPED! SEE http://www.mobileread.com/forums/showpost.php?p=2885085 FOR DETAILS!

This plugin enables some additional features for the Kobo Touch, Glo, Mini, Aura HD, and Aura. ePub books processed with this plugin will be rendered using Kobo's internal kepub renderer instead of the standard ePub renderer.



The main benefits of using the kepub renderer (which some may prefer not to have) are:
  • Page numbers show the number of page turns remaining in the current chapter instead of the estimated number of pages for the entire book.
    • If you don't want this, there is an option in the driver settings to force full-book page numbers.
  • Reading statistics (time left in this chapter, time for the next chapter, time to complete the book)
  • The book title is shown at the top of each page.
  • The chapter title, if any, is shown at the bottom of each page with the page numbers.



Usage

To use this plugin after installing:
  • Connect your Kobo Touch/Glo/Mini device and wait for it to be detected by calibre
  • Select the book(s) you want to send to your device.
  • Click the Send to device button.



Special Notes
  • This plugin requires calibre 1.3.0 or later.
  • This plugin is only tested using Kobo firmware 3.3.0 and calibre 1.39.0.
  • It is recommended that you disable the built-in KoboTouch driver (but not the built-in Kobo driver) while this plugin is installed. On rare occasions, calibre may select the built-in KoboTouch driver instead of this plugin.
  • This device plugin enables access to Kobo features that are written with the expectation that only unmodified Kobo-purchased books will be used.
  • When configuring the plugin, it is not necessary to include the '.kepub' portion of the file name; the plugin will add that automatically.
  • Modified ePub books are not saved to your calibre library in their kepub form; the kepub is only sent to your device, your copy in calibre is never modified.



Installation Directions

Open Preferences -> Plugins -> Get new plugins and install the 'Kobo Touch Extended' plugin. You may also download the attached zip file and install the plugin manually, then restart calibre as described in the Introduction to Plugins thread.



Known Issues

Not everything works perfectly all the time. Here are some of the issues I know about that are likely to stick around for a while.

Spoiler:
  • When using Kobo firmware 2.9.0 or later, sideloaded KePub files do not display in-book statistics.
  • If you have previously installed this plugin in calibre 0.9.18 or earlier, then you upgrade to calibre 0.9.19 or later and can't update the plugin, you must manually remove the plugin ZIP file:
    • Open the calibre plugin directory.

      • Don't know where this is? Before you close calibre, open calibre's preferences, choose Miscellaneous, and click the Open calibre configuration directory button. The plugin directory is in there.

    • Delete the file named KoboTouchExtended.zip.

    Start calibre and re-install the plugin.
  • If you get an error similar to the following:

    Code:
    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 4
    
    
    
    ^
    
    SyntaxError: invalid syntax
    The solution is to read the README file from top to bottom
  • In some circumstances people have reported that while reading a book uploaded with this plugin they suddenly realize that a large amount of time (two hours or more) has passed without their awareness of the passage of time. The only known solution is to finish reading your current book. Voracious readers tend to report this issue more frequently. Please note, sleep is only a temporary resolution.





Contributing

Decided you want to contribute to the development of this plugin? Awesome! If you want to contribute to the development of this plugin, you have many options:
  • Contribute code, whether for existing bug reports, for new bugs that you found, or for new features that you really want to see implemented. To contribute code, you may fork the repository and send a GitHub pull request, or you may send me a PM here with a git patch file. A tutorial on creating a git patch can be found at http://ariejan.net/2009/10/26/how-to...atch-with-git/
  • Submit bug reports on Launchpad. Launchpad bug reports are my to-do list for this plugin; any requests anywhere else are likely to get missed and forgotten. Although I'm happy to discuss the plugin here, I may still ask you to create a bug report; this is so I actually remember to investigate your request!
  • Test pre-released code from GitHub. Between releases, new code is committed to the GitHub repository and may be installed using directions provided in the README file. Based on your testing, you may submit bug reports, provide feedback, think of new feature requests, or just generally enjoy early access (and not necessarily stable code!) to upcoming versions of the plugin.
  • Translate the plugin on the plugin's Launchpad Translations page.



You may also prefer to contribute in some other way. You may donate to me via PayPal, contribute to my fundraiser, send BitCoin to 1JwHa28vQ33FzCofRMNgpzfUcNGpoh3hUR, or you may also contribute by answering questions from other people who may have issues, purchasing items from my wishlists (not yet linked, I'll get on that soon-ish), continuing to use this plugin and providing feedback, and probably a few other ways I haven't thought of yet.



Submitting Bugs

Found an issue? Have a new feature request? Great, I want to hear from you! Go to the Launchpad issue tracker and submit a new bug report or click the "This bug affects me" link on an existing bug report. To save us all time, please make sure to include the following details:
  • What version of calibre are you running? If this is not the latest version, you will likely be asked to upgrade and confirm that the bug still exists.
  • What version of the plugin are you using? If this is not the latest version, you will likely be asked to upgrade and confirm that the bug still exists.
  • What Kobo device you're using and what firmware version
    • To get the Kobo firmware version, from the Settings page choose Device Information and look for the line beginning with Software Version about two-thirds of the way down the page.
  • For issues processing books, whether or not you are able to send me a book that demonstrates the problem. Please be aware of the directions provided when submitting a new bug which detail how to include a book and what bug options to set.
  • The calibre debug log showing the issue, where applicable
    • To get the calibre debug log, select Preferences -> Restart in debug mode and reproduce the issue. The calibre debug log will be displayed shortly after closing calibre.

Although I'm generally perfectly happy to discuss possible issues here, any issues sent to me through any means other than the Launchpad bug tracker (including email, PM, etc.) may be silently ignored. This is not because I don't care! It's because I have a terrible memory, the Launchpad issue tracker is my "to-do list" for this plugin, and there's been instances where I've seen a post or PM here and promptly forgotten all about it until I happened to stumble across the post again later. If you aren't sure if you have an issue, feel free to post here and we can work together to decide if you need to make a new Launchpad issue or not. If you are sure you have an issue, or if you have an error or exception from calibre, post a new issue. It isn't necessary to post here when you make a new issue, I get notified of all new bugs and I check the list regularly. The worst that could possibly happen on Launchpad is the same that could happen here: I'll tell you that it's not a bug and you'll have the opportunity to convince me otherwise!



README file

For ease of reference, the important parts of the README file are hidden behind this Spoiler block. I'll try to remember to keep it up to date, but the current version is always here on GitHub.

Spoiler:


Please note: Modified books are not saved back into your Calibre library to prevent issues with overwriting library configurations unexpectedly, so books are processed in transit to your device every time. In most cases, the extra time required should not be noticeable.



Additionally, a calibre conversion output format plugin is available, allowing you to convert books to KePub format without a supported device.



WARNING: THE CONVERSION OUTPUT FORMAT PLUGIN GENERATES FILES WHOSE INTERNAL STRUCTURE IS STILL UNDER DEVELOPMENT. THE KEPUB FILE STRUCTURE IS NOT YET FULLY UNDERSTOOD. DO NOT, UNDER ANY CIRCUMSTANCES, DELETE THE FILES FOR THE SOURCE FORMAT. ALWAYS HAVE A NON-KEPUB FORMAT FOR YOUR BOOKS.



Download

To download this plugin, either clone the repository or download a snapshot of the master branch by clicking on the big Download ZIP button on the right side of the page.



Installation

The current release version of this plugin may be installed directly within calibre:
  • Open calibre's preferences, choose Plugins, and click Get new plugins
  • Select the KoboTouchExtended plugin from the list of available plugins and click Install
    • Don't see it? You may already have it installed. Restart calibre and see if you are notified of a pending update.
  • Restart calibre



To install the device driver plugin from source, you must rename device_init.py to __init__.py, create a ZIP file named KoboTouchExtended.zip and include these files and folders:
  • __init__.py
  • container.py
  • common.py
  • device
  • css
  • plugin-import-name-kobotouch_extended.txt



To install the conversion output format plugin from source, you must rename conversion_init.py to __init__.py, create a ZIP file named KePub Output.zip and include these files and folders:
  • \_\_init\_\_.py
  • container.py
  • common.py
  • conversion
  • css
  • plugin-import-name-koboconversion.txt



To create the ZIP file:
  • Windows users can run the create-plugin.ps1 script (requires that Powershell allow running unsigned scripts, which is not the default setting).
    • This Powershell script generates the ZIP file for both plugins.
  • Linux and Mac OS X users can run the create-plugin.sh script (either grant it executable permissions first, or run sh create-plugin.sh).
    • This script generates the ZIP file for both plugins
  • Create an empty ZIP file and add the files noted above.
  • Select the files noted-above, right-click, and add the files to a new ZIP file. This may also be referred to as a "Compressed Folder" or only be available once you choose the "Archive" option, depending on your operating system.



Add the resulting ZIP file to calibre:
  • Preferences
  • Plugins
  • Load plugin from file



Usage

To use the device driver plugin after installing:
[LIST]
[*]Connect your Kobo Touch/Glo/Mini device and wait for it to be detected by calibre
[*]Select the book(s) you want to send to your device.
[*]Click the Send to device button.



To use the conversion output format plugin after installing:
  • Choose the book you want to convert to KePub format
  • Choose the KEPUB format from the list of output formats (top-right of the conversion window)
  • Choose KePub Options from the left menu and make your option selections
  • Click OK



WARNING: THE CONVERSION OUTPUT FORMAT PLUGIN GENERATES FILES WHOSE INTERNAL STRUCTURE IS STILL UNDER DEVELOPMENT. THE KEPUB FILE STRUCTURE IS NOT YET FULLY UNDERSTOOD. DO NOT, UNDER ANY CIRCUMSTANCES, DELETE THE FILES FOR THE SOURCE FORMAT. ALWAYS HAVE A NON-KEPUB FORMAT FOR YOUR BOOKS.



Adding Arbitrary CSS

The device driver plugin, through the base KoboTouch driver provided with calibre, has the ability to copy all rules from a specific CSS file into each book as it is uploaded. To support easily maintaining device-specific CSS files, the device driver can copy a CSS file into the correct place to allow adding it to each book. To do this, locate the calibre plugin directory, create a CSS file in there, and ensure that the Modify CSS option is selected in the driver preferences. To locate the calibre plugin directory, open calibre's preferences, choose Miscellaneous, and click the Open calibre configuration directory button. The plugin directory is in there.



The name of the CSS file must be in the format kobo_extra_.css. The following replacements for are currently supported (capitalization is important):
  • Kobo Aura HD - AURAHD (kobo_extra_AURAHD.css)
  • Kobo Aura - AURA (kobo_extra_AURA.css) (plugin version 2.2.8 or later)
  • Kobo Glo - GLO (kobo_extra_GLO.css)
  • Kobo Mini - MINI (kobo_extra_MINI.css)
  • Kobo Touch - TOUCH (kobo_extra_TOUCH.css)



Please note, this will blindly overwrite any kobo_extra.css you may have already sent to your Kobo device! If you have created the kobo_extra.css file on your Kobo device already and you want to make use of this feature, you must copy kobo_extra.css to the location specified above.



Hyphenation

Both plugins include the ability to add a CSS file to each book enabling KePub hyphenation. The standard hyphenation dictionaries are somewhat deficient for some languages; fixing this requires a little work and requires that you can create gzipped tarballs (.tgz files). Note that you can only update existing dictionaries, you cannot add new ones.
  • Somewhere on your computer, create the directory structure usr/local/Kobo/hyphenDicts
  • Download the LibreOffice (or OpenOffice) hyphenation dictionary for your language

    • This will be a file with the 'oxt' extension. This is just a ZIP archive with a different name.

  • Unzip the OXT file and look for the file named as hyph_.dic.
  • Copy the hyphenation dictionary to the hyphenDicts folder without changing the name.
  • . Add the usr folder to KoboRoot.tgz

    • UNIX users (Linux, Solaris, BSD, Mac) can, from the command line, run tar czf KoboRoot.tgz usr/ from wherever you put the usr directory.

    • Windows users, you're on your own. Contributions of reliable Windows directions are welcome!




Once you have created KoboRoot.tgz copy it to the .kobo directory on your Kobo device, unmount/eject the drive, and unplug the device. You will see a screen indicating that the Kobo device is updating; it is not, but this method takes advantage of the Kobo update mechanism to load the necessary dictionary files. Make sure you keep your version of KoboRoot.tgz around, you will need to re-apply it after every Kobo software update!



Provided languages are:
  • English (en_US)
  • French (fr_FR)
  • Spanish (es_ES)
  • German (de_DE)
  • Italian (it_IT)
  • Portugese (pt_PT)



Please note that even with this feature, hyphenation is not exact. You cannot add hyphenation dictionaries for new languages, you can only update the existing dictionaries.



Kobo JavaScript Extraction

Both 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). Enabling this requires a little work:
  • Obtain a KePub file from Kobo which is provided to you without any Digital Restrictions Management.

    • Some of Kobo's free eBooks are provided without DRM

    • In some regions, Kobo devices are sold with free ebooks in the .kobo/kepub/ folder which do not have DRM

  • Copy the KePub file to the calibre plugins directory

    • To find the plugins directory, open calibre's preferences, choose Miscellaneous, and click Open calibre configuration directory

    • Go to the plugins directory

  • Rename the KePub file to reference.kepub.epub




Once this file is in place and correctly named this plugin will automatically extract the Kobo JavaScript file, add it to books during conversion, and add appropriate references to content files.



Generated KePub File Copying

On occasion, such as for debugging purposes, you may wish to have easy access to the generated KePub file. There is an option which allows you to enter the full, absolute path to a directory where all generated files will be copied to once they have been converted. This directory must:
  • Be somewhere you can write to
  • Contain no variables

    • OS X and Linux users may use a tilde (~) to refer to their home directory instead of typing it in full (/home/jgoguen/calibre-debug may be entered as ~/calibre-debug). Windows users must always enter a full path.




The final path will be 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}/{title} then a KePub file would be copied to, for example, /home/jgoguen/calibre-debug/Camerata, Jo/A History of Vanguard Industries.kepub.epub. Directories will be created as needed.



Contributing

Decided you want to contribute to the development of this plugin? Awesome! You have many options:
  • Contribute code, whether for existing bug reports, for new bugs that you found, or for new features that you really want to see implemented. To contribute code, you may fork the repository and send a GitHub pull request, or you may send me a PM here with a git patch file. A tutorial on creating a git patch can be found here
  • Submit bug reports on Launchpad. Launchpad bug reports are my to-do list for this plugin; any requests anywhere else are likely to get missed and forgotten and direct emails will be silently ignored. Although I'm happy to discuss the plugin here, I may still ask you to create a bug report; this is so I actually remember to investigate your request!
  • Test pre-released code from GitHub. Between releases, new code is committed to the GitHub repository and may be installed using directions provided in the README file. Based on your testing, you may submit bug reports, provide feedback, think of new feature requests, or just generally enjoy early access (and not necessarily stable code!) to upcoming versions of the plugin.

    Translate the plugin on the plugin's Launchpad Translation page



You may also prefer to contribute in some other way. You may [URL=https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=UXNT7PRVZ5HGAdonate to me via PayPal[/URL], contribute to my fundraiser, send BitCoin to 1JwHa28vQ33FzCofRMNgpzfUcNGpoh3hUR, or you may also contribute by answering questions from other people who may have issues, purchasing items from my wishlists (not yet linked, I'll get on that soon-ish), continuing to use this plugin and providing feedback, and probably a few other ways I haven't thought of yet.



Asking Questions

Wondering how to do something? Want to know if something is possible? Ask your question in this thread (for the device driver plugin) or the thread for the conversion output plugin, whichever is most appropriate.



Reporting a Bug

Found a bug with this plugin? Great! Please use the Launchpad issue tracker to send me reports of issues or questions. Under no circumstances should I be emailed directly unless I have asked to have something sent to me. Any emails I haven't asked for may be silently ignored at my sole discretion. Everyone can benefit from a public bug tracker, but only one person benefits from a private email.



When submitting a bug, I require the following information as a minimum, but any additional information is good to include:
  • What version of calibre and this plugin you are using. If you are not on the latest version of either, I will require that you update before I accept any bug report.
  • The full error message reported by calibre, if any.
  • For issues processing books, whether or not you have a book that you are able to send me that demonstrates the issue. Please follow the directions when submitting a new bug to provide me with a book. Under no circumstances should copyrighted content be uploaded to a public bug.
  • The calibre debug log.

    • To get the calibre debug log, click the arrow beside the Preferences menu, choose Restart in debug mode, repeat the same action that caused the issue, and close calibre. The debug log will be automatically displayed to you.




Known Issues

When using Kobo firmware 2.9.0 or later, sideloaded KePub files do not display in-book statistics.



If you have previously installed this plugin in calibre 0.9.18 or earlier, then you upgrade to calibre 0.9.19 or later and can't update the plugin, you must manually remove the plugin ZIP file:
  • Open the calibre plugin directory.

    • Don't know where this is? Before you close calibre, open calibre's preferences, choose Miscellaneous, and click the Open calibre configuration directory button. The plugin directory is in there.

  • Delete the file named KoboTouchExtended.zip.

Start calibre and re-install the plugin.



If you get an error similar to the following:

Code:
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 4



^

SyntaxError: invalid syntax
The solution is to read the README file from top to bottom



In some circumstances people have reported that while reading a book uploaded with this plugin they suddenly realize that a large amount of time (two hours or more) has passed without their awareness of the passage of time. The only known solution is to finish reading your current book. Voracious readers tend to report this issue more frequently. Please note, sleep is only a temporary resolution.





Version History

Spoiler:

Version 2.2.19 - 2014-08-13
Fix an issue with text after empty tags being duplicated
Version 2.2.18 - 2014-07-16

Fix an issue with prefs panes not loading properly

Version 2.2.17 - 2014-07-09

Compatibility with upcoming calibre 2

Version 2.2.16 - 2014-05-30

Bug #1324884 - Image tags need to be wrapped in koboSpan tags

Version 2.2.15 - 2014-05-01

Bug #1310967 - properly decode internal content files that are not UTF-8

Version 2.2.14 - 2013-12-20

Translations update

Version 2.2.13 - 2013-11-16

Support Firmware 3.0.0

Version 2.2.12 - 2013-11-08

Bug #1246505 - Stop adding spaces around em-dashes

Add translation support and initial translations

Version 2.2.11 - 2013-10-28

Support database version 89.

Version 2.2.10 - 2013-10-13

Bug #1227733 - Allow choosing the page number format (normal per-chapter or full-book)

Version 2.2.6 - 2013-08-28

Bug #1217488 - Commit container after mainline driver processing

Version 2.2.5 - 2013-08-25

Bug #1216504: Properly handle Processing Instruction and Comment nodes

Version 2.2.4

Bug #1215698 - Fix crashing on first-time plugin configuration

Version 2.2.3 - 2013-08-20

Code restructured to allow sharing as much code as possible with the new conversion output format plugin.

Update to not process books that have already been processed by the conversion output format plugin.

Version 2.1.0 - 2013-08-02

Bug #1205702 - met67 fixed the nested Kobo spans, which appears to resolve highlighting issues.

General updates to support KoboTouch driver changes in calibre 0.9.42

Version 2.0.2 - 2013-07-30

Bug #1206406 - Update hover text for hyphenation

Bug #1206451 - Do not crash when configuring from the Configure This Device option.

Version 2.0.1 - 2013-07-29

Bug #1205976 - Fix crash on non-ePub file upload

Bug #1204730 - Allow easy choice between ePub and KePub upload

Version 2.0.0 - 2013-07-28

Allow the options dialog to be scrollable so people with small screen resolutions don't lose parts of the dialog.

Bug #1202864 - When copying KePub files to a debug directory, use the driver save template to generate the path to copy the book to.

Bug #1197219 - When silently ignoring failed conversions, actually upload the books as ePub instead of teasing the poor end user with suggestive wording.

Add an option to block award tiles from the home screen.

Improve detection of books already converted to KePub to avoid processing a converted book again.

Bug #1204907 - Change hyphenation option to use CSS-based hyphenation. Updated README with new method and directions.

Bug #1205703 - Embed driver details in converted books for improved debugging.

Version 1.5.0 - 2013-07-02

Bug #73 - Fix auto-detection of the ePub cover image

Bug #69 - Add an option to add a DB trigger to disable the ReventBooks tile when processing new books. Applies to side-loaded and Kobo-synced books.

Add an option to add a DB trigger preventing the Kobo analytics DB table from being updated.

Version 1.4.3 - 2013-06-16

Bug #66 - Do not add spaces after punctuation marks where there shouldn't be any.

Bug #68 - Fix issues with multi-line comment nodes being mangled when smartening punctuation.

Version 1.4.2 - 2013-06-09

Support Kobo FW 2.6.1.

Bug #60 - When sanitizing file names, remove all characters prohibited by Windows.

Bug #61 - Parse content files even if they have the wrong content type.

Bug #65 - Fix errors sending books with smarten punctuation enabled.

Do not add the Kobo JavaScript if there is already a kobo*.js file present.

Tighten up logic when detecting cover image without OPF metadata hints.

Do not add Kobo spans to files that already have them.

Force cleanup of invalid markup.

Version 1.4.1 - 2013-05-30

Bug #56 - Remove slashes from names when sending books

Bug #57 - Fix handling of ProcessingInstruction nodes

Bug #58 - Make sure there's actually text to append to

Version 1.4.0 - 2013-05-27

Bugs #48, 52, 53 - Optimize Kobo span generation, significantly reducing file size and DOM complexity.

Bug #54 - Verify that a node has children before trying to reference child nodes.

Bug #55 - Fix issues with adding spaces where there should be none by including the trailing whitespace in the text group regex

Do not consider the semi-colon a full-stop character. It's used for entity encoding.

Version 1.3.3 - 2013-05-22

Bug #42 - Only set the ImageID for books in the current calibre library.

Bug #43 - Allow specifying a directory to copy generated KePub files to (for debugging purposes).

Bug #44 - Don't process ProcessingInstruction nodes like normal nodes, they're special.

Bug #45 - Fix missing text between HTML tags.

Bug #46 - Update ImageID fields in batches to avoid Python query limits.

Bug #47 - Properly account for multi-line text nodes that start with line-break characters.

Bug #50 - Only set the ImageID field when covers are being uploaded.

Fix issues smartening punctuation when HTML comments are present.

Version 1.3.2 - 2013-05-17

Add significantly more Kobo span tags to improve position detection and hopefully fix bookmarks and annotations

Fix issue preventing this plugin from working with calibre 0.9.30 or later on Windows and Mac due to a bug in Python 2.7.4 (Linux users were unaffected)

Version 1.3.1 - 2013-05-09

Firmware 2.5.2 is now supported

Version 1.3.0 - 2013-05-08

Firmware 2.5.1 is now supported

A new option to smarten punctuation during conversion is now available

Spaces are properly added where text is followed by XHTML tags

Error position reporting is improved

Extract Kobo JavaScript from a provided KePub (see the README for details)

Issues resolved detecting where to add Kobo span tags

Version 1.2.7 - 2013-04-17

Fix an issue where the selected node does not always have a parent to be removed from.

Fix an issue where hyphenating removes spaces when HTML tags follow text.

Version 1.2.6 - 2013-04-17

Fix an issue which prevented non-ePub files from being sent to the device

Add progress reporting

Previous versions - Please see the GitHub commit log

Attached Files
File Type: zip KoboTouchExtended.zip (28.6 KB, 3635 views)

Last edited by jgoguen; 08-14-2014 at 10:10 AM.
jgoguen is offline   Reply With Quote
Old 04-20-2013, 03:28 AM   #2
ShellShock
Guru
ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.
 
ShellShock's Avatar
 
Posts: 892
Karma: 1642544
Join Date: Sep 2008
Device: Sony PRS-505 & PRS-650, Kobo Glo & Aura HD
thanks. When using this plugin, is the title bar displayed when reading, as usual with kepubs but not with epubs?
ShellShock is offline   Reply With Quote
Old 04-20-2013, 04:21 AM   #3
jgoguen
Generally Awesome Person
jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.
 
Posts: 657
Karma: 2018502
Join Date: Jan 2013
Location: San Francisco Bay Area
Device: Kindle Paperwhite 2
The title bar is another kepub feature. I don't believe I can disable it.
jgoguen is offline   Reply With Quote
Old 04-20-2013, 10:43 AM   #4
buffaloseven
Watching the Sky
buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.
 
buffaloseven's Avatar
 
Posts: 231
Karma: 634112
Join Date: Sep 2012
Location: Winnipeg, MB
Device: Kobo Aura
So just out of curiosity, Calibre plugins are entirely python-based (just making sure I'm not missing anything)? If so I could definitely contribute code from time to time. Seems like container.py is the part Calibre talks to and driver.py does the heavy lifting?

The plugin is great; so far I've had no troubles with annotations or bookmarks, but that's probably just as likely to be luck of the draw with my .epub structures. Also, thanks for so quickly addressing the issue with car/cbz files.
buffaloseven is offline   Reply With Quote
Old 04-20-2013, 06:25 PM   #5
jgoguen
Generally Awesome Person
jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.
 
Posts: 657
Karma: 2018502
Join Date: Jan 2013
Location: San Francisco Bay Area
Device: Kindle Paperwhite 2
Yes, so far as I'm aware, plugins are purely Python. For me, container.py is the interface to the unpacked ePub structure, and it's where I do most of the book modification work, and driver.py does the rest of the heavy lifting. There is some modification (hyphenation mostly) outside container.py but I plan to work on moving that around later.
jgoguen is offline   Reply With Quote
Old 04-22-2013, 05:00 AM   #6
Moonraker
Addict
Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.
 
Moonraker's Avatar
 
Posts: 290
Karma: 1002965
Join Date: Mar 2006
Location: UK
Device: ILiad. Gen 3, PocketBook 360, PRS-505, Kindle 3,Kobo Glo, Kobo Aura HD
How do I disable the main Kobo driver when I am installing this plugin?

Calibre tells me it cannot be disabled.

Am I selecting the correct one to disable?
Moonraker is offline   Reply With Quote
Old 04-22-2013, 07:38 AM   #7
bookwurm70
Zealot
bookwurm70 seems famous, but is in fact legendary.bookwurm70 seems famous, but is in fact legendary.bookwurm70 seems famous, but is in fact legendary.bookwurm70 seems famous, but is in fact legendary.bookwurm70 seems famous, but is in fact legendary.bookwurm70 seems famous, but is in fact legendary.bookwurm70 seems famous, but is in fact legendary.bookwurm70 seems famous, but is in fact legendary.bookwurm70 seems famous, but is in fact legendary.bookwurm70 seems famous, but is in fact legendary.bookwurm70 seems famous, but is in fact legendary.
 
bookwurm70's Avatar
 
Posts: 142
Karma: 75118
Join Date: Nov 2009
Location: Southern Illinois
Device: eSlick, Pocketbook IQ, iPad, Kobo Aura
Extended plugin question

Okay, so I've downloaded the kobo extended plugin. How do I use it? Will the resulting kepubs say kepub? Will I be able to use the kepub on my iPad/iPhone?
bookwurm70 is offline   Reply With Quote
Old 04-22-2013, 07:44 AM   #8
jgoguen
Generally Awesome Person
jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.
 
Posts: 657
Karma: 2018502
Join Date: Jan 2013
Location: San Francisco Bay Area
Device: Kindle Paperwhite 2
Quote:
Originally Posted by Moonraker View Post
How do I disable the main Kobo driver when I am installing this plugin?

Calibre tells me it cannot be disabled.

Am I selecting the correct one to disable?
First, make sure you don't have your Kobo device plugged in while you're doing this.

Then, in calibre open Preferences -> Plugins and look under the Device Interface Plugins list for Kobo Reader Device Interface and KoboTouch. For each one, select it and click the Enable/Disable plugin button. As long as your device isn't plugged in, they should be disabled.
jgoguen is offline   Reply With Quote
Old 04-22-2013, 07:54 AM   #9
jgoguen
Generally Awesome Person
jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.
 
Posts: 657
Karma: 2018502
Join Date: Jan 2013
Location: San Francisco Bay Area
Device: Kindle Paperwhite 2
Quote:
Originally Posted by bookwurm70 View Post
Okay, so I've downloaded the kobo extended plugin. How do I use it?
To use the plugin, you just send books to your Kobo device.

Quote:
Originally Posted by bookwurm70 View Post
Will the resulting kepubs say kepub?
On the Kobo device, yes the modified books are identified as KOBO EPUB while unmodified ePub files are identified as EPUB. If you mean in calibre, then no they aren't identified in any way because the kepub version is never saved to your calibre library.

Quote:
Originally Posted by bookwurm70 View Post
Will I be able to use the kepub on my iPad/iPhone?
I don't know if you can use the generated kepubs on your iOS app. I don't see why not, but it's not something that I've tested. If you would like to try it and report back on how it worked, there may be other people who would also like to know.
jgoguen is offline   Reply With Quote
Old 04-22-2013, 08:24 AM   #10
bookwurm70
Zealot
bookwurm70 seems famous, but is in fact legendary.bookwurm70 seems famous, but is in fact legendary.bookwurm70 seems famous, but is in fact legendary.bookwurm70 seems famous, but is in fact legendary.bookwurm70 seems famous, but is in fact legendary.bookwurm70 seems famous, but is in fact legendary.bookwurm70 seems famous, but is in fact legendary.bookwurm70 seems famous, but is in fact legendary.bookwurm70 seems famous, but is in fact legendary.bookwurm70 seems famous, but is in fact legendary.bookwurm70 seems famous, but is in fact legendary.
 
bookwurm70's Avatar
 
Posts: 142
Karma: 75118
Join Date: Nov 2009
Location: Southern Illinois
Device: eSlick, Pocketbook IQ, iPad, Kobo Aura
Quote:
Originally Posted by jgoguen View Post
First, make sure you don't have your Kobo device plugged in while you're doing this.

Then, in calibre open Preferences -> Plugins and look under the Device Interface Plugins list for Kobo Reader Device Interface and KoboTouch. For each one, select it and click the Enable/Disable plugin button. As long as your device isn't plugged in, they should be disabled.
Thanks! I disabled the other Kobo plugins. Now all I need is for my Aura to arrive and I'm ready to side load!
bookwurm70 is offline   Reply With Quote
Old 04-22-2013, 08:31 AM   #11
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 5,667
Karma: 5656630
Join Date: Jul 2011
Location: Australia
Device: Kobo Touch, Kobo Glo
Quote:
Originally Posted by bookwurm70 View Post
Thanks! I disabled the other Kobo plugins. Now all I need is for my Aura to arrive and I'm ready to side load!
Sorry, you aren't ready. The drivers don't support the Aura HD yet. The next calibre release should include the changes needed.
davidfor is offline   Reply With Quote
Old 04-22-2013, 08:47 AM   #12
jgoguen
Generally Awesome Person
jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.jgoguen ought to be getting tired of karma fortunes by now.
 
Posts: 657
Karma: 2018502
Join Date: Jan 2013
Location: San Francisco Bay Area
Device: Kindle Paperwhite 2
This plugin explicitly only supports the Kobo Touch, Kobo Glo, and Kobo Mini. I don't have an Aura to test with so any updates to my plugin will have to be done by someone else with an Aura, or someone will have to send me an Aura.

EDIT: And by "explicitly only supports", I mean that this plugin will completely fail to recognize any other devices. Once the mainline Kobo driver includes Aura support, you will have to use the mainline driver and not my plugin to use calibre to send books over.

Last edited by jgoguen; 04-22-2013 at 08:51 AM.
jgoguen is offline   Reply With Quote
Old 04-22-2013, 11:10 AM   #13
Moonraker
Addict
Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.Moonraker ought to be getting tired of karma fortunes by now.
 
Moonraker's Avatar
 
Posts: 290
Karma: 1002965
Join Date: Mar 2006
Location: UK
Device: ILiad. Gen 3, PocketBook 360, PRS-505, Kindle 3,Kobo Glo, Kobo Aura HD
Thank you for these instructions. I have now got it to work.

I am very pleased that the problematic fonts (Nickel etc) are now working as they should and not showing italics as regular bold.

I am also pleased that my own installed fonts are showing their true weight instead of appearing anaemic and thin. The Advanced option is not available but it's no matter because my own fonts display their weight and I can still adjust font-size, line spaces and margins.

I'm not sure about the page numbers only showing number of pages left in a chapter but I can live with this because of the other advantages. I love that the title of the book is displayed in the header.

So one very happy customer here, Thank you.

Last edited by Moonraker; 04-22-2013 at 11:12 AM.
Moonraker is offline   Reply With Quote
Old 04-26-2013, 09:02 AM   #14
Mingyar
Connoisseur
Mingyar is a marvel to beholdMingyar is a marvel to beholdMingyar is a marvel to beholdMingyar is a marvel to beholdMingyar is a marvel to beholdMingyar is a marvel to beholdMingyar is a marvel to beholdMingyar is a marvel to beholdMingyar is a marvel to beholdMingyar is a marvel to beholdMingyar is a marvel to behold
 
Posts: 50
Karma: 11822
Join Date: Feb 2013
Device: Kobo Glo/Mini
Hello jgoguen,

Does the plugin work with the new kobo driver of Calibre 0.9.28 ?

What's new for 0.9.28 :
Kobo driver: Add support for the new Kobo Aura HD and firmware version 2.5.0

Thanks
Mingyar is offline   Reply With Quote
Old 04-26-2013, 09:06 AM   #15
Canuck_in_Japan
Wizard
Canuck_in_Japan ought to be getting tired of karma fortunes by now.Canuck_in_Japan ought to be getting tired of karma fortunes by now.Canuck_in_Japan ought to be getting tired of karma fortunes by now.Canuck_in_Japan ought to be getting tired of karma fortunes by now.Canuck_in_Japan ought to be getting tired of karma fortunes by now.Canuck_in_Japan ought to be getting tired of karma fortunes by now.Canuck_in_Japan ought to be getting tired of karma fortunes by now.Canuck_in_Japan ought to be getting tired of karma fortunes by now.Canuck_in_Japan ought to be getting tired of karma fortunes by now.Canuck_in_Japan ought to be getting tired of karma fortunes by now.Canuck_in_Japan ought to be getting tired of karma fortunes by now.
 
Canuck_in_Japan's Avatar
 
Posts: 1,167
Karma: 8080730
Join Date: May 2009
Location: Tokyo, Japan
Device: iTouch, Jetbook, PRS 650, Aura HD
Quote:
Originally Posted by jgoguen View Post
[*]It is recommended that you disable the built-in Kobo drivers while this plugin is installed. On rare occasions, calibre may select the built-in driver instead of this plugin.
Thank you for this. I see looking at Calibre, I have Kobo Reader Device Interface and KoboTouch plugins. Should I be disabling both of those?
Canuck_in_Japan is online now   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kobo Device Driver Update davidfor Devices 206 10-10-2014 06:00 AM
[Device Plugin] Kindle 2, 3, 4, Touch Device Interface MBP Update Mod cryzed Plugins 7 10-28-2012 04:58 PM
[Device Interface Plugin] Update for Nook Color Driver jmricker Plugins 0 10-22-2011 10:11 AM
Touch Kobo Touch Extended 2 Year Warranty - Is it worth the $34.99? EverC Kobo Reader 11 08-31-2011 11:47 PM
Touch Kobo Touch Extended Warranty Program SensualPoet Kobo Reader 1 07-17-2011 04:08 AM


All times are GMT -4. The time now is 03:27 PM.


MobileRead.com is a privately owned, operated and funded community.