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 07-19-2022, 01:08 PM   #451
thiago.eec
Guru
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 996
Karma: 1183425
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Quote:
Originally Posted by theducks View Post
There is another reason that Jimm's idea is best:
The icons IN the plugin are default and the fallback.
whereas the Resources are User supplied
Yes, and I'm not suggesting to change that. That is the default behavior.
I think you misunderstood my post.
thiago.eec is online now   Reply With Quote
Old 07-19-2022, 02:52 PM   #452
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,526
Karma: 4277329
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
New Test Version Posted

2022-07-19
- Look for icon.png without images/ first.

FYI, I'm not sure this is going to be the final solution.

In Cal6, the get_icons(icon_name,plugin_name) does retrieval from resources/images, from a theme and then, if not in either, retrieval from the plugin zip.

In past, the plugin code removed the 'images/' before looking in resources/images for custom icons, but kept it for looking inside the plugin zip.

Moving the icon.png up from the images/ dir inside the plugin zip didn't work when I tried it in Cal5. As I recall, there were reasons it was in images/, but I don't remember why exactly.

Regardless, it would require retesting on the all supported old versions of Calibre, in all the plugins I support. I'm not doing that, sorry.

This appears to work as expected:
Code:
...
        if not icon or icon.isNull():
            icon = get_icons(icon_name.replace('images/',''),plugin_name)
        if not icon or icon.isNull():
            icon = get_icons(icon_name,plugin_name)
    return icon
Except that Cal6 explicitly reports not finding 'icon.png' (without images/) all the time in the debug log if it's not found in resources/images or theme (we know it's not to be found in plugin zip):
Code:
Traceback (most recent call last):
  File "C:\Users\user\Desktop\nook\calibre\src\calibre\customize\zipplugin.py", line 50, in get_resources
  File "zipfile.py", line 1464, in read
  File "zipfile.py", line 1503, in open
  File "zipfile.py", line 1430, in getinfo
KeyError: "There is no item named 'icon.png' in the archive"
It's not raising the exception, it's just printing the stack trace to debug.

But it happens quite a bit, and I run calibre in debug 99.9% of the time.

I could cache icons in the plugin, but then they wouldn't change if you change themes. Which isn't something that works consistently for me anyway?

Last edited by JimmXinu; 07-31-2022 at 10:44 AM. Reason: Remove obsolete test version
JimmXinu is offline   Reply With Quote
Advert
Old 07-19-2022, 10:11 PM   #453
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,319
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://github.com/kovidgoyal/calibr...41ede054db0e34

You will of course need to version check before using the new parameter.
kovidgoyal is offline   Reply With Quote
Old 07-20-2022, 02:29 PM   #454
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,526
Karma: 4277329
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Thanks.

I will post plugin test version(s) that use this after Calibre 6.2 comes out.
JimmXinu is offline   Reply With Quote
Old 07-30-2022, 10:24 AM   #455
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,526
Karma: 4277329
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
New Test Version Posted

2022-07-30
- Use cal6 icon theme system to allow plugin icon customization--but don't require pluginname/images/

Should work correctly now with new icon theme system and old system and internal images without reporting extra errors (cal6.2+).

Quote:
Originally Posted by JimmXinu View Post
New Test Version Posted
...
thiago.eec, I'd appreciate it if you'd confirm if this solves the issue for you; thanks.

Last edited by JimmXinu; 07-31-2022 at 10:43 AM. Reason: Remove obsolete test version
JimmXinu is offline   Reply With Quote
Advert
Old 07-31-2022, 08:28 AM   #456
thiago.eec
Guru
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 996
Karma: 1183425
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Quote:
Originally Posted by JimmXinu View Post
New Test Version Posted
thiago.eec, I'd appreciate it if you'd confirm if this solves the issue for you; thanks.
Hi, @JimmXinu

It works fine here. Thanks!
thiago.eec is online now   Reply With Quote
Old 07-31-2022, 10:43 AM   #457
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,526
Karma: 4277329
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
New Version Released

Version 2.14.0 - 2022-07-31
- Use Cal6 get_icons() so icon themes apply
- Update Translations
JimmXinu is offline   Reply With Quote
Old 09-09-2022, 11:03 AM   #458
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,526
Karma: 4277329
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
New Test Version

2022-09-09

- Fix remove/up/down rows when lower selected first.

Issue found in Reading List.

Last edited by JimmXinu; 09-13-2022 at 11:12 AM. Reason: Remove obsolete test version
JimmXinu is offline   Reply With Quote
Old 09-13-2022, 11:11 AM   #459
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,526
Karma: 4277329
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
New Version Released

Version 2.15.0 - 2022-09-13
- Fix remove/up/down rows when lower selected first.
- Update Translations
JimmXinu is offline   Reply With Quote
Old 01-01-2023, 08:44 PM   #460
Geremia
Addict
Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!
 
Posts: 238
Karma: 100000
Join Date: Oct 2012
Device: Calibre
Is there a way to use this plugin from the command-line, without having to import the EPUBs into Calibre?
Geremia is offline   Reply With Quote
Old 01-01-2023, 09:30 PM   #461
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,526
Karma: 4277329
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by Geremia View Post
Is there a way to use this plugin from the command-line, without having to import the EPUBs into Calibre?
There are two ways:
  1. If you go back to the first post of this thread, there's a section on "Command Line Interface(CLI)" about how to call the plugin's basic functionality from the version installed in Calibre.

    This version is intended for users who have Calibre installed and want to use EpubMerge from CLI without needing Python installed.
  2. If, OTOH, you have Python but don't normally have Calibre installed, you visit the EpubMerge github project page where you can download the epubmerge.py file and run it directly. You will also need the python library 'six' installed.
I've never gotten around to doing a 'proper' pypi CLI release of EpubMerge; there's an issue about it and everything.
JimmXinu is offline   Reply With Quote
Old 02-15-2023, 04:14 AM   #462
Elizebeth Janell
Junior Member
Elizebeth Janell began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Feb 2023
Device: Samsung Galaxy
What to do with merged files

I recently found your plug-in, and it works great. My question is : can I remove the original files the anthology makes up from Calibre to free up the space on my booklist ?
Elizebeth Janell is offline   Reply With Quote
Old 02-15-2023, 09:54 AM   #463
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,526
Karma: 4277329
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Yes.

The merged copy does not depend on the source epubs. In fact, if you have the EpubMerge config option "Keep UnMerge Metadata" checked (it is checked by default), you can even UnMerge the new epub to get the original epubs back again.
JimmXinu is offline   Reply With Quote
Old 03-11-2023, 05:12 AM   #464
Mandabar
Fanfiction Devourer
Mandabar ought to be getting tired of karma fortunes by now.Mandabar ought to be getting tired of karma fortunes by now.Mandabar ought to be getting tired of karma fortunes by now.Mandabar ought to be getting tired of karma fortunes by now.Mandabar ought to be getting tired of karma fortunes by now.Mandabar ought to be getting tired of karma fortunes by now.Mandabar ought to be getting tired of karma fortunes by now.Mandabar ought to be getting tired of karma fortunes by now.Mandabar ought to be getting tired of karma fortunes by now.Mandabar ought to be getting tired of karma fortunes by now.Mandabar ought to be getting tired of karma fortunes by now.
 
Posts: 47
Karma: 539564
Join Date: Nov 2012
Device: Android: Moon+ Reader Pro
Oh hey, It's you again Jimm~!

You make all the best plugins, you are just the best!

On to my question. Is there a way to configure the plugin to have it rename the stylesheets and other merged files? I think it's a quirk of my android epub reader app (Moon+ Reader Pro) that it doesn't handle same-name files in different folders very well. It works fine if I manually edit them in calibre's editor to rename all the covers, stylesheets, and pagestyles so they aren't the same (sequential numbering or whatever). Otherwise it just keeps reusing the first instance.

Just double-checking since I don't see an option that jumps out at me as being for this and it's not the largest of hardships to manually batch rename my occasional epubmerge.
Mandabar is offline   Reply With Quote
Old 03-11-2023, 10:27 AM   #465
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,526
Karma: 4277329
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
No.

Changing file names also requires finding and changing all the references to those files in other files and EpubMerge just isn't that smart.

It's an issue that's come up before with Sigil.
JimmXinu is offline   Reply With Quote
Reply

Tags
calibre, combine books, epubmerge, make collection, merge epub, merge epubs


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Open With kiwidude Plugins 403 04-01-2024 08:39 AM
[GUI Plugin] Quick Preferences kiwidude Plugins 62 03-16-2024 11:47 PM
[GUI Plugin] FanFictionDownLoader JimmXinu Plugins 3985 05-08-2015 11:18 PM
eBookCleaner slobberchopz Plugins 9 02-23-2012 04:25 AM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


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


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