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 04-23-2022, 12:12 PM   #1636
lomkiri
Zealot
lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.
 
lomkiri's Avatar
 
Posts: 139
Karma: 1000102
Join Date: Jul 2021
Device: N/A
Quote:
Originally Posted by DaveLessnau View Post
In my case, the test_4 version failed. It looks like it worked regarding the ToC, but overall it came back saying it failed:
It seems that there is no error, but that when mod-epub don't find anything to correct, it emits this msg (in action.py). Do you confirm, Chaley ?

Spoiler:
Code:
    def _modify_completed(self, job):
        if job.failed:
            self.gui.job_exception(job, dialog_title=_('Failed to modify ePubs'))
            return
        modified_epubs_map = job.result
        self.gui.status_bar.show_message(_('Modify ePub completed'), 3000)

        update_count = len(modified_epubs_map)
        if update_count == 0:
            msg = _('No ePub files were updated')
            return error_dialog(self.gui, _('Modify ePub failed'), msg,
                                show_copy_button=True, show=True,
                                det_msg=job.details)


Edit:
Oops, once more I missed the train, you answered while I was writing ;-)
Maybe it will be better if there is an info_message() instead a error_message, since mod-epub didn't failed at all, it just worked on a perfect epub ;-)...

Last edited by lomkiri; 04-23-2022 at 12:18 PM.
lomkiri is offline   Reply With Quote
Old 04-23-2022, 12:14 PM   #1637
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,942
Karma: 7219261
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by lomkiri View Post
It seems that there is no error, but that when mod-epub don't find anything to correct, it emits this msg (in action.py). Do you confirm, Chaley ?
Yes. The problem is that it could have failed or it could have done no work. At this point it doesn't know which.

I am changing the wording of that message box a bit to make that (I hope) a bit clearer.
chaley is offline   Reply With Quote
Advert
Old 04-23-2022, 12:21 PM   #1638
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,942
Karma: 7219261
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
This is the new wording.
Attached Thumbnails
Click image for larger version

Name:	Clipboard03.jpg
Views:	157
Size:	22.1 KB
ID:	193439  
chaley is offline   Reply With Quote
Old 04-23-2022, 12:39 PM   #1639
enuddleyarbl
Guru
enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.
 
enuddleyarbl's Avatar
 
Posts: 745
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
@lomkiri and @chaley: Thanks for all the work you two put into this. It was really interesting and I appreciate it.
enuddleyarbl is offline   Reply With Quote
Old 04-25-2022, 01:26 PM   #1640
KingSlav
Junior Member
KingSlav began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Apr 2022
Location: Los Angeles
Device: kindle Paperwhite 7th Gen
Question v 1.7.2 Syntax Error message

Novice Question: Updated to the latest Modify ePub (version 1.7.2) using calibre 4.23 (64 bit) and now get a syntax error message when using Modify ePub.
calibre, version 4.23.0 (win32, embedded-python: True)
Failed to modify ePubs: Failed: Modify ePubs version (1, 7, 2)

Modify ePubs version (1, 7, 2)
Python function terminated unexpectedly
invalid syntax (calibre_plugins.modify_epub.container, line 932) (Error Code: 1)
Traceback (most recent call last):
File "site.py", line 114, in main
File "site.py", line 88, in run_entry_point
File "site-packages\calibre\utils\ipc\worker.py", line 209, in main
File "site-packages\calibre\utils\ipc\worker.py", line 143, in arbitrary_n
File "importlib\__init__.py", line 37, in import_module
File "site-packages\calibre\customize\zipplugin.py", line 185, in load_module
File "calibre_plugins.modify_epub.jobs", line 14, in <module>
File "site-packages\calibre\customize\zipplugin.py", line 185, in load_module
File "calibre_plugins.modify_epub.modify", line 23, in <module>
File "site-packages\calibre\customize\zipplugin.py", line 181, in load_module
File "calibre_plugins.modify_epub.container", line 932
self.log(f'\tncx name: {self.ncx_name}')
^
SyntaxError: invalid syntax
Any suggestions?
KingSlav is offline   Reply With Quote
Advert
Old 04-25-2022, 01:58 PM   #1641
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,942
Karma: 7219261
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by KingSlav View Post
Novice Question: Updated to the latest Modify ePub (version 1.7.2) using calibre 4.23 (64 bit) and now get a syntax error message when using Modify ePub.
calibre, version 4.23.0 (win32, embedded-python: True)
Failed to modify ePubs: Failed: Modify ePubs version (1, 7, 2)

Modify ePubs version (1, 7, 2)
Python function terminated unexpectedly
invalid syntax (calibre_plugins.modify_epub.container, line 932) (Error Code: 1)
Traceback (most recent call last):
File "site.py", line 114, in main
File "site.py", line 88, in run_entry_point
File "site-packages\calibre\utils\ipc\worker.py", line 209, in main
File "site-packages\calibre\utils\ipc\worker.py", line 143, in arbitrary_n
File "importlib\__init__.py", line 37, in import_module
File "site-packages\calibre\customize\zipplugin.py", line 185, in load_module
File "calibre_plugins.modify_epub.jobs", line 14, in <module>
File "site-packages\calibre\customize\zipplugin.py", line 185, in load_module
File "calibre_plugins.modify_epub.modify", line 23, in <module>
File "site-packages\calibre\customize\zipplugin.py", line 181, in load_module
File "calibre_plugins.modify_epub.container", line 932
self.log(f'\tncx name: {self.ncx_name}')
^
SyntaxError: invalid syntax
Any suggestions?
My oops. I left some python 5 (calibre 5) code in the plugin. The file in the first post has been updated. You can get it there or wait for calibre to tell you it is available.
chaley is offline   Reply With Quote
Old 06-06-2022, 06:12 PM   #1642
jjl
Junior Member
jjl began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2010
Device: nook
Amazon conversion Encode HTML in UTF-8

Reasearching this issue with sending docs to Amazon & them now converting ePub's, I have been using this plug-in over the last several weeks to fix the files before I am sending these as personal docs via email - thank you, it works great! With multiple Kindle devices (and using app on iPad), I like emailing personal docs to Amazon as it works very well to keep my reading progress in sync across devices.

However, l am finding that I need to run this more often than not, and wondering if it can be run automatically when I add a book to calibre? I can see how to convert an ePub to an ePub when I add a book but prefer to minimize any changes to original file so have been using this plug-in. I am open to alternate solutions - as a novice this is what has worked for me to date. Very frustrating on first read of a book to find it a mess when I don't run this plug-in.
jjl is offline   Reply With Quote
Old 06-07-2022, 06:25 AM   #1643
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 75,917
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by jjl View Post
Reasearching this issue with sending docs to Amazon & them now converting ePub's, I have been using this plug-in over the last several weeks to fix the files before I am sending these as personal docs via email - thank you, it works great! With multiple Kindle devices (and using app on iPad), I like emailing personal docs to Amazon as it works very well to keep my reading progress in sync across devices.

However, l am finding that I need to run this more often than not, and wondering if it can be run automatically when I add a book to calibre? I can see how to convert an ePub to an ePub when I add a book but prefer to minimize any changes to original file so have been using this plug-in. I am open to alternate solutions - as a novice this is what has worked for me to date. Very frustrating on first read of a book to find it a mess when I don't run this plug-in.
You could try the Action Chains plugin and create an action chain to do this. Check out the Action Chains thread for more info.

https://www.mobileread.com/forums/sh...d.php?t=334974
JSWolf is offline   Reply With Quote
Old 06-07-2022, 06:53 PM   #1644
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,937
Karma: 27620688
Join Date: Mar 2012
Location: Sydney Australia
Device: none
↑ ↑ ↑ ✔

Also check out this thread ==>>Action Chains Scripts

BR
BetterRed is offline   Reply With Quote
Old 06-09-2022, 06:25 PM   #1645
jjl
Junior Member
jjl began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2010
Device: nook
Thank you for posting to the scripts - I was still trying to understand action chains - a bit overwhelming! The scripts in the thread look like a much easier way to get started.

Thank you all - amazing the efforts that go into not just Calibre, but the add-ins also!
jjl is offline   Reply With Quote
Old 06-13-2022, 02:50 AM   #1646
galaxyhub
Member
galaxyhub began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Jul 2019
Device: Kindle Paperwhite, Galaxy Tab S2 8.0
Feature Request:
An option under 'Metadata' to remove all 'calibre:user_metadata' meta entries please.
galaxyhub is offline   Reply With Quote
Old 06-13-2022, 04:29 AM   #1647
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,942
Karma: 7219261
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by galaxyhub View Post
Feature Request:
An option under 'Metadata' to remove all 'calibre:user_metadata' meta entries please.
That is already there in the Metadata section: "Remove non dc: metadata elements". Is there some reason that doesn't work for you?
chaley is offline   Reply With Quote
Old 06-16-2022, 12:16 PM   #1648
dragoworld235
Enthusiast
dragoworld235 began at the beginning.
 
Posts: 26
Karma: 10
Join Date: Oct 2012
Device: kobo libra 2
I’ve just discovered this plugin. thanks chaley!

I’m going to use it a lot to remove the metadata added to my epub because my Calibre was misconfigured.

Would it be possible to add an option to remove html comments embeded in an epub pages?
dragoworld235 is offline   Reply With Quote
Old 06-16-2022, 04:37 PM   #1649
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,942
Karma: 7219261
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by dragoworld235 View Post
Would it be possible to add an option to remove html comments embeded in an epub pages?
It is possible but I have no interest in doing it. If someone else does the work then I will be happy to release it. Or relinquish maintenance to that "someone".

I suspect that it wouldn't be too hard to do in the editor with search/replace but I haven't tried it.
chaley is offline   Reply With Quote
Old 06-16-2022, 07:58 PM   #1650
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,937
Karma: 27620688
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by dragoworld235 View Post
I’ve just discovered this plugin. thanks chaley!

I’m going to use it a lot to remove the metadata added to my epub because my Calibre was misconfigured.

Would it be possible to add an option to remove html comments embeded in an epub pages?
Quote:
Originally Posted by chaley View Post
It is possible but I have no interest in doing it. If someone else does the work then I will be happy to release it. Or relinquish maintenance to that "someone".

I suspect that it wouldn't be too hard to do in the editor with search/replace but I haven't tried it.
You don't need to use the book editor's S&R feature to remove a metadata element from an EPUB. Open the EPUB's OPF file (in the book editor), delete the entire element (in this case dc:description) in the code window, and save the EPUB.

If you don't want to 'mess' with editing the OPF code, you can use Sigil's Metadata Editor tool to remove individual metadata elements with the click of a button?

FWIW: I move the text from the Comments column to a Blurb custom column using calibre's Metadata Editor (in bulk via its S&R tool, or cut and paste for an individual book). This allows me to edit Blurb from the book list, and remove it from the EPUB with this plugin.

BR
BetterRed is offline   Reply With Quote
Reply

Tags
modify epub


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Quality Check kiwidude Plugins 1197 08-05-2024 06:06 AM
[GUI Plugin] Manage Series kiwidude Plugins 167 07-28-2024 03:07 PM
[GUI Plugin] Open With kiwidude Plugins 403 04-01-2024 08:39 AM
Modify ePub plugin dev thread kiwidude Development 346 09-02-2013 05:14 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 10:13 PM.


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