|
|
#121 |
|
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 597
Karma: 32228
Join Date: Feb 2012
Device: Onyx Boox Leaf
|
This is a great Christmas gift for me. Thank you very much.
|
|
|
|
|
|
#122 |
|
Belgian Pommes Frites
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 150
Karma: 35038
Join Date: Jan 2012
Device: Pocketbook Touch HD
|
I have been using some simple editor chains for some time now. Some search&replace items. That works well, and saves me time (thanks). But I would like to add some actions that only work on the opf file eg remove page-map. Is this possible or not? My knowledge of editor chains is still in its infancy. And I did not see any posts that clearly indicate this possibility.
|
|
|
|
|
|
#123 | |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,344
Karma: 1436993
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
Quote:
|
|
|
|
|
|
|
#124 |
|
Belgian Pommes Frites
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 150
Karma: 35038
Join Date: Jan 2012
Device: Pocketbook Touch HD
|
Oh man....that is so cool. I did not know this fuctionality was there.
Thank you. ![]() ![]()
|
|
|
|
|
|
#125 |
|
Belgian Pommes Frites
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 150
Karma: 35038
Join Date: Jan 2012
Device: Pocketbook Touch HD
|
Thiago, In Post #99 you provide code to solve invaild IDs. That is something I would like to automate too, but how does this code work? I have no clue as to the steps needed to do so? I have read your post and the ones before and after, but I am still clueless. My knowledge is definitely not up to scratch. Any chance as to a step by step explanation how to do this? Would be much appreciated. Thanks in advance.
|
|
|
|
|
|
#126 | |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,344
Karma: 1436993
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
Quote:
Spoiler:
Then, you need to create the chain, via Add/Modify Chains > Plus sign (+) > Choose a name > Gear icon (Settings) > You can choose an icon or not > Plus sign (+) > Select the new line > Double click in the Action field > User actions > Replace IDs > Ok. Now, the new action will appear as option in the main menu. You can also use it as part of more complex chain, like the one you asked about before, doing search and replace. Last edited by thiago.eec; 04-15-2026 at 08:28 AM. |
|
|
|
|
|
|
#127 |
|
Belgian Pommes Frites
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 150
Karma: 35038
Join Date: Jan 2012
Device: Pocketbook Touch HD
|
A very big thank you for posting this.
So the "Manage Modules" actually allows to add new code to the plugin. I have always wondered why it was there. It is now working for me. One item less to manually do. ![]() ![]() ![]()
|
|
|
|
|
|
#128 |
|
Belgian Pommes Frites
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 150
Karma: 35038
Join Date: Jan 2012
Device: Pocketbook Touch HD
|
Thiago, In post 99 you have several zip files attached. One of them is "clean up.zip". On looking at it, I see a json file that contains interesting stuff I would like to automate too. I tried to add it to my Manage Modules in editor chains but I get the error message some stuff is missing. Hence I assume it is not code for a module in editor chains. But the question is then: how do I add this to the editor chain? Or are these all search & replace statements? And how would I add it to my saved search & replace statements? Do I need to merge it with some calibre json file?
|
|
|
|
|
|
#129 | |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,344
Karma: 1436993
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
Quote:
1) Modules: they were posted inside the spoiler tag; click 'show' to view the code; add them to your modules. Some of those are used in the 'Cleanup' chain, so if not present the chain will fail. Modules are not chains, so they can't be used directly. You neeed to create a chain and configure it to use the respective module (like the 'Replace IDs' chain). 2) Regex function: there is only one posted. This is used to find <img> tags missing the alt attribute. To use it in the chain, add this function to the editor first: open the search tool (CTRL+F) and change mode to Regex Function; then click on 'Create/edit'; replace the content with the provided code; give this function a name (it will be used in the 'Cleanup' chain). 3) ZIP files: those are the chain files. You can import then directly via Add/modify Chains > Right click in the table > Import. After you add the 'Cleanup' chain, click in the gear icon. You can remove actions you don't need and add your own search/replace actions. The missing 'alt' action needs to be configured, pointing to your Regex function created in step 2. I hope this covers everything. |
|
|
|
|
|
|
#130 |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 63
Karma: 1231814
Join Date: Nov 2017
Device: Kobo Libra Colour, Kindle Voyage(s)
|
When running using Action Chains, this (optionally) creates a backup. What is the best way to restore this backup if needed?
|
|
|
|
|
|
#131 | |
|
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 35
Karma: 39964
Join Date: May 2025
Device: Kindle PW, iPad
|
Restoring from EC_BACKUP
Quote:
Not sure if there's a better/easier way to restore the backup within Calibre, but the way I ended up doing it was with an Action Chain: Action: Save/Restore Formats Settings: - Source format: ec_backup - Destination format: epub Check "Confirm overwriting existing format confirmation dialog" if you want Calibre to ask before replacing any existing EPUBs, otherwise they're silently overwritten. If you want the backup to be automatically deleted after the restore, check "Remove source format after copying." I've attached the Action Chain I used. It made it super easy to restore everything. On a related note, something I only caught shortly before this whole thing happened: if you're running a chain with multiple Editor Chain actions in it and want a backup copy of the EPUB before anything is changed, only check the backup option on the first Editor Chain. Backup is selected by default on each Editor Chain action, so you have to remember to uncheck it on the steps after the 1st one. |
|
|
|
|
|
|
#132 | |
|
Belgian Pommes Frites
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 150
Karma: 35038
Join Date: Jan 2012
Device: Pocketbook Touch HD
|
Quote:
![]() ![]() ![]() |
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Editor Plugin] EpubCheck | Doitsu | Plugins | 230 | 04-10-2026 03:19 AM |
| [Editor Plugin] LanguageTool | Doitsu | Plugins | 17 | 04-20-2024 02:21 PM |
| [Editor Plugin] - Enabling 'Customize plugin' dialog directly from the Editor | thiago.eec | Development | 7 | 01-09-2019 08:05 PM |
| Sample Plugin for the Editor | DiapDealer | Editor | 77 | 12-10-2014 07:16 AM |
| Editor plugin question | DiapDealer | Development | 2 | 07-28-2014 10:23 PM |