|
|
#526 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
|
|
|
|
|
#527 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
|
|
|
|
|
#528 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
|
|
|
|
|
#529 | |
|
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,025
Karma: 50506929
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
Only to report:
Got the following Quote:
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. |
|
|
|
|
|
|
#530 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
|
|
|
|
|
#531 |
|
Doingsmth
![]() 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
|
|
|
|
|
|
#532 |
|
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,025
Karma: 50506929
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
^ PMed a link
|
|
|
|
|
|
#533 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
|
|
|
|
|
#534 |
|
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 |
|
|
|
|
|
#535 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
|
|
|
|
|
#536 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
|
|
|
|
|
#537 |
|
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
|
|
|
|
|
#538 | |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,457
Karma: 212177022
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
![]() 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. |
|
|
|
|
|
|
#539 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
|
|
|
|
|
#540 | |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29,457
Karma: 212177022
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
![]() 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. |
|
|
|
|
![]() |
| Tags |
| mobi2mobi |
|
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 |