Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 08-13-2025, 06:16 PM   #526
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 29,457
Karma: 212177022
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
The main error seems to be that a file/folder name is not being found:

/Users/thomas/Desktop/unpack/MOBI-The Science Book_ Big Ideas Simply Explain - Dk.mobi

The 2nd error is in the error handling for the 1st error. I've fixed something similar in another KindleUnpack plugin function in the past. It should be easy enough to fix here, but unless I can replicate that "No such file or directory" error, I'll have trouble tracking the initial error down.

Have you tried using the standalone KindleUnpack to try and split that Kindle Previewer created mobi? The problem could be upstream in KindleUnpack proper rather than the plugin.
DiapDealer is online now   Reply With Quote
Old 08-14-2025, 10:32 AM   #527
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 29,457
Karma: 212177022
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Can you get me an example of a Kindle Previewer-built dual format Kindlebook that this plugin fails to split? Upload it somewhere and send me a link via PM if copyright is an issue.
DiapDealer is online now   Reply With Quote
Old 08-15-2025, 01:36 PM   #528
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 29,457
Karma: 212177022
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
For what it's worth: I released a new version that fixes the error-handling bug. And until I can get a sample of KindlePreviewer-created content that won't split properly, I've allowed either portion of the split process to fail (with a warning) without terminating the plugin entirely.

If you're not having any trouble, there's no real reason to update.
DiapDealer is online now   Reply With Quote
Old 01-28-2026, 09:02 AM   #529
PoP
 curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.
 
PoP's Avatar
 
Posts: 3,025
Karma: 50506929
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
Only to report:

Got the following
Quote:
calibre, version 8.16.1
ERREUR : KindleUnpack - The Plugin v0.83.8: 2

Traceback (most recent call last):
File "calibre_plugins.kindleunpack_plugin.action", line 271, in unpack_ebook
File "calibre_plugins.kindleunpack_plugin.mobi_stuf f", line 126, in unpackMOBI
File "calibre_plugins.kindleunpack_plugin.kindleunpackc ore.kindleunpack", line 949, in unpackBook
File "calibre_plugins.kindleunpack_plugin.kindleunpackc ore.kindleunpack", line 870, in process_all_mobi_headers
File "calibre_plugins.kindleunpack_plugin.kindleunpackc ore.kindleunpack", line 647, in processMobi7
File "calibre_plugins.kindleunpack_plugin.kindleunpackc ore.mobi_dict", line 225, in getPositionMap
KeyError: 2

unpacking this (perfectly working) dictionary referred in this mobileread thread

By curiosity only, I wanted to inspect the inflections. Beyond the obvious, no need to spend too much time on debugging. Thanks.
PoP is offline   Reply With Quote
Old 01-28-2026, 10:32 AM   #530
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 29,457
Karma: 212177022
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I think that error places the problem in the upstream standalone kindleunpack core files rather than the plugin. But I'll take a look.
DiapDealer is online now   Reply With Quote
Old 03-18-2026, 04:59 PM   #531
Hag_Sub
Doingsmth
Hag_Sub began at the beginning.
 
Posts: 55
Karma: 10
Join Date: Mar 2026
Device: Kindle PW3
Unrelated to discussion

Hey Pop if you don't mind can your forward me the midori's files for soft float
Hag_Sub is offline   Reply With Quote
Old 03-19-2026, 08:45 AM   #532
PoP
 curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.
 
PoP's Avatar
 
Posts: 3,025
Karma: 50506929
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
^ PMed a link
PoP is offline   Reply With Quote
Old 03-19-2026, 12:30 PM   #533
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 29,457
Karma: 212177022
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Moderator Notice
A post has been deleted. If a tiny bit of thread drift doesn't bother me--the OP and the Editor--I would appreciate it if others refrained from attempting to moderate this thread without a license.

Last edited by DiapDealer; 03-19-2026 at 12:52 PM.
DiapDealer is online now   Reply With Quote
Old 04-29-2026, 03:19 PM   #534
gurcha
Enthusiast
gurcha can spell AND pronounce 'liseuse.'gurcha can spell AND pronounce 'liseuse.'gurcha can spell AND pronounce 'liseuse.'gurcha can spell AND pronounce 'liseuse.'gurcha can spell AND pronounce 'liseuse.'gurcha can spell AND pronounce 'liseuse.'gurcha can spell AND pronounce 'liseuse.'gurcha can spell AND pronounce 'liseuse.'gurcha can spell AND pronounce 'liseuse.'gurcha can spell AND pronounce 'liseuse.'gurcha can spell AND pronounce 'liseuse.'
 
Posts: 37
Karma: 39966
Join Date: Aug 2023
Device: Kindle
Subject: Request: Add support for icon overrides / theming

Hi,

Could you please add support for Calibre's built‑in icon theming in a future update?

Currently your plugin uses a custom get_icon() function, which prevents users from overriding the toolbar icon with their own custom images or Calibre icon themes.

The fix is simple: replace the custom function with Calibre's native get_icons(). For example:

python
# Instead of a custom get_icon() function...
# Use Calibre's built-in function:
from calibre.customize.zipplugin import get_icons

icon = get_icons('icon.png', 'Your Plugin Name')
self.qaction.setIcon(icon)
This would allow users to place a custom icon.png in:
calibre/resources/images/Your Plugin Name/icon.png

And it would also make the plugin respect the user's active Calibre icon theme.

Thank you for considering this. I really appreciate your work on this plugin.

Thanks
gurcha is offline   Reply With Quote
Old 04-29-2026, 08:26 PM   #535
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 29,457
Karma: 212177022
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I don't have enough info to commit to doing this. Changes like this are very rarely "simple." When I created this plugin, there was no native calibre get_icons() function. Hence the custom wrapper to get_resources(). I work very hard to make sure this plugin maintains compatibility with ancient versions of calibre, so I'd need to make sure this change would not raise the minimum calibre version my plugin currently supports. If it doesn't, I will happily try to accommodate this change sometime in the future. But if it DOES change the minimum supported calibre version, I'm afraid I'm not willing to sacrifice support for those older calibre versions for a cosmetic-only change. Either way, it's probably not going to be priority for me.

Last edited by DiapDealer; 04-29-2026 at 08:47 PM.
DiapDealer is online now   Reply With Quote
Old 04-30-2026, 09:17 AM   #536
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 29,457
Karma: 212177022
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Also... just put your custom icon named explode3.png in "calibre/resources/images/KindleUnpack - The Plugin" and Calibre will use it just fine. No need for me to modify code and change my icon name for this functionality.
DiapDealer is online now   Reply With Quote
Old 05-12-2026, 10:40 PM   #537
gurcha
Enthusiast
gurcha can spell AND pronounce 'liseuse.'gurcha can spell AND pronounce 'liseuse.'gurcha can spell AND pronounce 'liseuse.'gurcha can spell AND pronounce 'liseuse.'gurcha can spell AND pronounce 'liseuse.'gurcha can spell AND pronounce 'liseuse.'gurcha can spell AND pronounce 'liseuse.'gurcha can spell AND pronounce 'liseuse.'gurcha can spell AND pronounce 'liseuse.'gurcha can spell AND pronounce 'liseuse.'gurcha can spell AND pronounce 'liseuse.'
 
Posts: 37
Karma: 39966
Join Date: Aug 2023
Device: Kindle
Update to include light/dark theme custom icons

Hi DiapDealer,

Thanks for the considered response — your concern about backwards compatibility is completely valid, and I want to address it directly.

I've put together a patch that adds light/dark theme-aware icon support while maintaining compatibility with Qt4, Qt5, and Qt6. The changes are confined to two files: utilities.py and action.py, both attached.

Here's what was changed and why it's safe:

utilities.py
- QApplication and QPalette are added to the existing import block, which already has PyQt4 → PyQt5 → qt.core fallbacks, so no minimum version change is introduced
- A new is_dark_theme() function detects the current theme using QPalette. It tries the Qt6 enum style (QPalette.ColorRole.Window) first, and falls back to the Qt5/Qt4 style (QPalette.Window) via AttributeError. If detection fails for any reason it silently returns False — no crash, no breakage
- get_pixmap() is updated to look for -for-light-theme and -for-dark-theme filename variants first, before falling back to the plain filename. This means the change is entirely opt-in — users without themed icons see zero behaviour change

action.py
- QApplication is added to the existing import block (same PyQt4 → PyQt5 → qt.core fallback chain)
- A paletteChanged signal connection is added so the toolbar icon updates live when the user switches themes. The connection is wrapped in try/except so if paletteChanged doesn't exist on an older Qt version it silently skips — the icon just won't update live, which is the same behaviour as today

The net result: on any calibre version that currently works, behaviour is identical unless the user explicitly places themed icon files in their resources/images/KindleUnpack - The Plugin/ folder. There is no minimum calibre version change.

I've tested this on calibre 9.8 on macOS, confirmed working for both light and dark mode on startup and live theme switching.

note - the folder for the custom icons is actually
'resources/images/KindleUnpack - The Plugin' and not just 'resources/images/KindleUnpack'

If you want to publish the patch so others can use it that would be great. Thank you for maintaining this plugin.
Attached Files
File Type: py action.py (16.0 KB, 16 views)
File Type: py utilities.py (13.1 KB, 15 views)
gurcha is offline   Reply With Quote
Old 05-13-2026, 10:41 AM   #538
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 29,457
Karma: 212177022
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by gurcha View Post
note - the folder for the custom icons is actually
'resources/images/KindleUnpack - The Plugin' and not just 'resources/images/KindleUnpack'

If you want to publish the patch so others can use it that would be great. Thank you for maintaining this plugin.
Yes. I'm aware that the entire plugin name needs to used in the resource path. If you look again, you'll note that's exactly what I typed in my previous post.

I'll take a look at your changes, but I'm afraid that theming third-party plugins (let alone supporting on-the fly theme changes) is not what I would consider a priority.

I'm also not fond of replacing plugin files wholesale to accommodate these changes. A pull request on the plugin's github repository would be best. But a minimum of a patch file could work too.
DiapDealer is online now   Reply With Quote
Old 05-13-2026, 12:03 PM   #539
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,958
Karma: 82520964
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Is compatibility with old versions of QT needed? I think (but might be wrong) that the plugin has a minimum calibre version of 8.xx which is QT6 based, so support for QT4 and 5 is not needed.
PeterT is offline   Reply With Quote
Old 05-13-2026, 12:21 PM   #540
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 29,457
Karma: 212177022
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by PeterT View Post
Is compatibility with old versions of QT needed? I think (but might be wrong) that the plugin has a minimum calibre version of 8.xx which is QT6 based, so support for QT4 and 5 is not needed.
You may want to check that minimum calibre version again. I fear you missed a leading zero. The plugin supports 0.8.xx or greater.

I don't like abandoning older hardware if there's little to be gained by doing so. So I like to make sure this plugin works on whatever version of calibre someone might be stuck with on their aging hardware.
DiapDealer is online now   Reply With Quote
Reply

Tags
mobi2mobi


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] EpubMerge JimmXinu Plugins 587 04-22-2026 04:38 PM
[GUI Plugin] Open With kiwidude Plugins 405 02-09-2026 07:54 AM
[GUI Plugin] EpubSplit JimmXinu Plugins 464 11-28-2025 12:33 AM
[GUI Plugin] Ex Libris AlPe Plugins 87 10-10-2020 03:10 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 06:24 AM.


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