Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old Today, 09:57 AM   #1
0x6f677548
Hugo Batista
0x6f677548 began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Jan 2024
Device: kobo clara hd
suggestion - kepubify: optimize spans for compatibility with text-modifying plugins

The kepubify approach adds spans that interact unexpectedly with text modifications made by other plugins, such as the (Intellireading Metaguiding plugin). This causes performance issues on some Kobo devices, particularly affecting users who rely on accessibility features.

Currently, the plugin wraps each phrase in a `<span class="koboSpan">` tag. When used with plugins that modify text structure (e.g., by adding bold tags), this results in a higher number of spans than intended. For example:

Original text:

Code:
Chapter 1
After (Intellireading Metaguiding plugin)
Code:
<b>Chap</b>ter <b>1</b>
After kepubify:
Code:
<b><span class="koboSpan" id="kobo.2.1">Chap</span></b><span class="koboSpan" id="kobo.3.1">ter</span><b><span class="koboSpan" id="kobo.4.1">1</span></b>
I would like to propose the optimization of the span insertion process by:

1. Avoiding inserting spans on text modification tags (italic, bold, underline)
2. Reducing the overall number of spans inserted


An optimized output could look like this:

Code:
<span class="koboSpan" id="kobo.1.1"><b>Chap</b>ter <b>1</b></span>
This approach would maintain the necessary Kobo-specific metadata while preserving text modifications made by other plugins, potentially improving device performance.

Currently, there are no effective workarounds. Users experiencing this issue are facing out-of-memory exceptions and significant slowdowns when loading chapters on their Kobo devices. I am currently testing a device driver approach where epub is converted to kepub before metaguiding, but that seems a bit over-engineering, and it would be great if the base kepubify process could change the way it handles these tags


How useful could this be

This enhancement could be highly useful to a significant number of users, particularly those with dyslexia or other reading difficulties who rely on text-modifying plugins like (Intellireading Metaguiding plugin). It would improve compatibility between accessibility features and device-specific optimizations, enhancing the reading experience for these users while maintaining the benefits of the Kobo TouchDriver.

Additional context

I've reported this issue on the past on the kobotouch extended plugin:
https://github.com/jgoguen/calibre-k...ver/issues/182

let me know your thoughts.
thanks
0x6f677548 is offline   Reply With Quote
Old Today, 06:52 PM   #2
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 44,844
Karma: 168802811
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Given that there is little empirical proof that modifying the text as suggested does anything to improve reader comprehension or reading speed (much as the various fonts claimed to be better for dyslexic readers have failed to show any reproducible improvement in several studies), IMO, time spent on this is not a good use of calibre's developers time.

As for the out of memory error? I tried using your plugin on an omnibus volume (1371332 words, 10.6MB) and there were no issues with opening it on a Kobo Glo, Clara HD, Sage (4.38.23171). or Kobo Libra Colour (4.41.23145). No out of memory (checked this from a NickelMenu option) nor did I notice any noticeable slowdown between the unmodified and modified versions sent as kepub or epub when opening the ebook or changing chapters.
DNSB is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Plugins page [Suggestion for Calibre website] Horus68 Calibre 12 09-20-2020 03:05 PM
Just a suggestion to the subforum text svenlind Calibre Companion 6 11-22-2016 04:18 AM
Empty Spans for iBooks compatibility JSWolf Workshop 24 12-19-2015 01:46 PM
PlugIns Screen UI Comment/Suggestion phossler Calibre 23 11-19-2014 10:04 PM
Tiny suggestion for plugins-locking user data bauerhjb Plugins 3 04-30-2014 10:50 PM


All times are GMT -4. The time now is 11:31 PM.


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