![]() |
#91 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,208
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
|
![]() |
![]() |
![]() |
#92 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Jul 2024
Device: kindle paperwhite
|
Thank you, @capink, for your plugins.
I have some editor chain actions defined and working from the editor, but when I try to get them to run from the action chain plugin nothing happens. I did get one action to work by defining a new editor chain action in the action chain UI, but nothing happens if I use an event to trigger it. The new editor chain action also does not show up in the editor chain plugin. I don't want to have to maintain two separate definitions. I just started using the plugins today, so I'm pretty sure I'm doing something wrong. Using Calibre 7.13 on an M1 MacBook Air. |
![]() |
![]() |
Advert | |
|
![]() |
#93 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,194
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
|
Quote:
For example, a chain containing an action like "Mark Cursor Tag" will not run at all because that action always depends on elements of the editor GUI, which are not available in Action Chains. Another example of this, is an action (e.g. Search And Replace), configured with a scope that depends on the editor GUI, e.g. "current file" or "selected files". You can run the same action from Action Chains with a scope that does not depend on the Editor's GUI, e.g. "text files" Quote:
If you want to have only one version, you must define it in the editor. Editor Chains cannot be aware of chains defined outside it. Last edited by capink; 07-03-2024 at 03:53 AM. |
||
![]() |
![]() |
![]() |
#94 | |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Jul 2024
Device: kindle paperwhite
|
Quote:
thx! Calibre Debug Log: Code:
ApplicationPaletteChange event ignored Using calibre Qt style: True 2024-07-03 15:03:57.716 calibre-debug[77060:25970649] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES. Failed to load resource: 'commit.txt' from the plugin zip file: /Users/danielgovier/Library/Preferences/calibre/plugins/OverDrive Libby.zip Traceback (most recent call last): File "calibre/customize/zipplugin.py", line 46, in get_resources File "zipfile.py", line 1510, in read File "zipfile.py", line 1547, in open File "zipfile.py", line 1476, in getinfo KeyError: "There is no item named 'commit.txt' in the archive" [overdrive_libby/0.1.9] Loaded 0 items from file cache /Users/danielgovier/Library/Preferences/calibre/plugins/overdrive_libby.libraries.json [overdrive_libby/0.1.9] Loaded 0 items from file cache /Users/danielgovier/Library/Preferences/calibre/plugins/overdrive_libby.media.json EpubMerge: DEBUG: 2024-07-03 15:03:58,896: calibre_plugins.epubmerge.epubmerge_plugin(156): macmenuhack file_path:/Users/danielgovier/Library/Preferences/calibre/plugins/fanficfare_macmenuhack.txt FFF: DEBUG: 2024-07-03 15:03:58,900: calibre_plugins.fanficfare_plugin.fff_plugin(217): Plugin FanFicFare macmenuhack file_path:/Users/danielgovier/Library/Preferences/calibre/plugins/fanficfare_macmenuhack.txt calibre Debug log calibre 7.13 embedded-python: True macOS-14.5-arm64-arm-64bit Darwin ('64bit', '') ('Darwin', '23.5.0', 'Darwin Kernel Version 23.5.0: Wed May 1 20:16:51 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T8103') Python 3.11.5 OSX: ('14.5', ('', '', ''), 'arm64') Interface language: None EXE path: /Applications/calibre.app/Contents/MacOS/calibre-debug Successfully initialized third party plugins: Action Chains (1, 20, 7) && Count Pages (1, 13, 6) && Editor Chains (1, 1, 7) && EpubMerge (2, 18, 0) && EpubSplit (3, 7, 0) && FanFicFare (4, 36, 0) && Generate Cover (2, 3, 4) && OverDrive Libby (0, 1, 9) && Overdrive Link (2, 57, 0) && Reading List (1, 15, 4) && ePub Extended Metadata {Writer} (0, 11, 2) && ePub Extended Metadata {Reader} (0, 11, 2) && ePub Extended Metadata (0, 11, 2) calibre 7.13 embedded-python: True macOS-14.5-arm64-arm-64bit Darwin ('64bit', '') ('Darwin', '23.5.0', 'Darwin Kernel Version 23.5.0: Wed May 1 20:16:51 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T8103') Python 3.11.5 OSX: ('14.5', ('', '', ''), 'arm64') Interface language: None EXE path: /Applications/calibre.app/Contents/MacOS/calibre-debug Successfully initialized third party plugins: Action Chains (1, 20, 7) && Count Pages (1, 13, 6) && Editor Chains (1, 1, 7) && EpubMerge (2, 18, 0) && EpubSplit (3, 7, 0) && FanFicFare (4, 36, 0) && Generate Cover (2, 3, 4) && OverDrive Libby (0, 1, 9) && Overdrive Link (2, 57, 0) && Reading List (1, 15, 4) && ePub Extended Metadata {Writer} (0, 11, 2) && ePub Extended Metadata {Reader} (0, 11, 2) && ePub Extended Metadata (0, 11, 2) QPA platform: cocoa devicePixelRatio: 2.0 logicalDpi: 72.0 x 72.0 physicalDpi: 127.50000191485789 x 127.50000191485789 [0.00] Starting up... [0.01] Showing splash screen... [0.16] splash screen shown [0.16] Initializing db... [0.20] db initialized [0.20] Constructing main UI... [1.16] GUI main window shown [1.21] main UI initialized... [1.21] Hiding splash screen Action chains: _get_plugins_resources(): start Editor chains: _get_plugins_resources(): start Editor Chains: _get_plugins_resources(): finished Editor Chains: actions that does not run headless: ['Mark Cursor Tag', 'Insert Before Cursor Tag', 'Insert After Cursor Tag'] calling method (on_modules_update) of obj (Tag Actions) Editor Chains: Tag Actions: running on_modules_update() calling method (on_modules_update) of obj (Style Actions) Editor Chains: Style Actions: running on_modules_update() Editor chains: _call_plugins_on_modules_update(): start Editor Chains: _call_plugins_on_modules_update(): finished Action Chains: _get_plugins_resources(): finished Action chains: formulas: running on_templates_update() Action chains: _call_plugins_on_modules_update(): start Action Chains: _call_plugins_on_modules_update(): finished FFF: DEBUG: 2024-07-03 15:04:16,694: adapter_literotica.py(40): LiteroticaComAdapter:__init__ - url='https://www.literotica.com/s/because-8' FFF: DEBUG: 2024-07-03 15:04:22,492: calibre_plugins.fanficfare_plugin.dialogs(493): self.extraoptions['anthology_url']:NOT FOUND FFF: DEBUG: 2024-07-03 15:04:22,497: adapter_literotica.py(40): LiteroticaComAdapter:__init__ - url='https://www.literotica.com/s/because-8' FFF: DEBUG: 2024-07-03 15:04:22,498: calibre_plugins.fanficfare_plugin.fff_plugin(1151): FanFicFare v4.36.0 Failed to request permission for showing notification: The operation couldn’t be completed. (UNErrorDomain error 1.) FFF: INFO: 2024-07-03 15:04:22,604: calibre_plugins.fanficfare_plugin.prefs(216): Using default settings FFF: DEBUG: 2024-07-03 15:04:22,615: adapter_literotica.py(40): LiteroticaComAdapter:__init__ - url='https://www.literotica.com/s/because-8' FFF: DEBUG: 2024-07-03 15:04:22,617: configurable.py(1080): use_browser_cache: FFF: DEBUG: 2024-07-03 15:04:22,617: configurable.py(1100): use_basic_cache:true FFF: DEBUG: 2024-07-03 15:04:22,617: adapter_literotica.py(110): Chapter/Story URL: <https://www.literotica.com/s/because-8> FFF: DEBUG: 2024-07-03 15:04:22,618: cache_basic.py(116): ========== MISS (GET) BasicCache https://www.literotica.com/s/because-8 FFF: DEBUG: 2024-07-03 15:04:22,618: fetcher_requests.py(114): ---------- REQ (GET) RequestsFetcher https://www.literotica.com/s/because-8 FFF: DEBUG: 2024-07-03 15:04:22,966: fetcher_requests.py(127): response code:200 FFF: DEBUG: 2024-07-03 15:04:22,966: decorators.py(112): fromcache:False FFF: DEBUG: 2024-07-03 15:04:22,966: requestable.py(55): Encoding:utf8 FFF: DEBUG: 2024-07-03 15:04:22,968: adapter_literotica.py(119): set opened url:https://www.literotica.com/s/because-8 FFF: DEBUG: 2024-07-03 15:04:23,034: adapter_literotica.py(141): One-shot FFF: DEBUG: 2024-07-03 15:04:23,069: calibre_plugins.fanficfare_plugin.fff_plugin(1468): from URL(https://www.literotica.com/s/because-8) FFF: DEBUG: 2024-07-03 15:04:23,091: calibre_plugins.fanficfare_plugin.fff_plugin(1673): title:Because FFF: DEBUG: 2024-07-03 15:04:23,092: calibre_plugins.fanficfare_plugin.fff_plugin(1674): outfile:/var/folders/xb/cm77xljj4qd0vb6sglr_12sh0000gn/C/calibre_7.13.0_tmp_k5vxfe6b/fanficfare_3jzhtftt/Because-Harddaysknight-3f4mp2t8.epub Failed to request permission for showing notification: The operation couldn’t be completed. (UNErrorDomain error 1.) Failed to request permission for showing notification: The operation couldn’t be completed. (UNErrorDomain error 1.) FFF: DEBUG: 2024-07-03 15:04:31,561: calibre_plugins.fanficfare_plugin.fff_plugin(1810): add/update Because https://www.literotica.com/s/because-8 id(None) FFF: DEBUG: 2024-07-03 15:04:31,582: calibre_plugins.fanficfare_plugin.fff_plugin(1825): Attempting metadata update FFF: DEBUG: 2024-07-03 15:04:31,598: adapter_literotica.py(40): LiteroticaComAdapter:__init__ - url='https://www.literotica.com/s/because-8' FFF: DEBUG: 2024-07-03 15:04:31,600: calibre_plugins.fanficfare_plugin.fff_plugin(2495): has link_map:True FFF: INFO: 2024-07-03 15:04:31,600: calibre_plugins.fanficfare_plugin.fff_plugin(2509): cover_image: FFF: DEBUG: 2024-07-03 15:04:31,741: calibre_plugins.fanficfare_plugin.fff_plugin(1909): Finished Adding/Updating 1 books. FFF: DEBUG: 2024-07-03 15:04:31,742: calibre_plugins.fanficfare_plugin.fff_plugin(1912): removed tdir Failed to request permission for showing notification: The operation couldn’t be completed. (UNErrorDomain error 1.) Failed to request permission for showing notification: The operation couldn’t be completed. (UNErrorDomain error 1.) FFF: DEBUG: 2024-07-03 15:04:31,870: calibre_plugins.fanficfare_plugin.fff_plugin(1940): Starting auto conversion of 1 books. Failed to request permission for showing notification: The operation couldn’t be completed. (UNErrorDomain error 1.) Failed to request permission for showing notification: The operation couldn’t be completed. (UNErrorDomain error 1.) |
|
![]() |
![]() |
![]() |
#95 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,194
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
|
Quote:
First question that jumps to mind, does your chain select which books to act on? I don't use FFF plugin myself, so I cannot really help you much with that. I presume the plugin downloads new epubs, in which case you can use "Selection Modifier" action to select books modified since the start of the chain. Edit: This won't work because the books are modified before the start of the chain. Ask in the FFF thread for help on how to select books. Last edited by capink; 07-04-2024 at 05:13 AM. |
|
![]() |
![]() |
Advert | |
|
![]() |
#96 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,208
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
Just came back to say again: Thanks for the great plugin. I use it a lot.
With it, I was able to create: 1) 'Clean-up' chain that: - Create a folder structure; - Remove unwanted files, embedded calibre metadata, Sigil and KindleUnpack artifacts; - Fix all HTMLs; - Use full page SVGs for covers; - Convert NAV landmarks and OPF guide to pt-BR; - Remove 'lang' and 'xml:lang' from <body> tag; - Fix missing 'alt' attribute on <img> tags; - Remove 'linear="no"' from OPF; - Customizable 'Pretty print all files' (adpted from calibre code, to avoid certain things, like adding spaces between the lines); - Run 'Check Book' at the end 2) Merge splited files automatically (thanks for the chain!) 3) Run 'Check Book' and fix all errors automatically 4) Replace invalids IDs 5) A customizable 'Upgrade to EPUB3' based on calibre orginal tool, that can keep the NCX and the <guide> element (in the OPF). This gives me maximum backward compatibility I can't thank you enough for this plugin. Made my life a lot easier. =) |
![]() |
![]() |
![]() |
#97 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,194
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
|
Quote:
If it is not much trouble for you, please export your chain and post it here, so any one who might be interested can use it to his benefit. You talked about two customized actions: 'Pretty print all files' and 'Upgrade to EPUB3'. These can be done using either the "Run python code" action, or can be done as separate modules. If it is the former, the code will be available in the exported chain, if it is the latter, please post the code of the modules. When I have the time, I will see if I can use the code to modify the plugin actions to incorporate them as configurable options. This is a busy period for me, so I am not sure when I will be able to do it. Thanks. |
|
![]() |
![]() |
![]() |
#98 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,208
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
Quote:
Sure, I'll send them in next post. |
|
![]() |
![]() |
![]() |
#99 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,208
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
My modules:
The chains are attatched. _______________________ Edit: I noticed that the regex functions are not included with the chain. Most of them are used to convert items to pt-BR, so not relevant for most users. There is one, though, that is important: Code:
def replace(match, number, file_name, metadata, dictionaries, data, functions, *args, **kwargs): if 'alt=' not in match[0]: ans = match.group().replace(match.group(1), match.group(1) + ' alt=""') else: ans = match[0] return ans Last edited by thiago.eec; 06-14-2025 at 05:20 PM. |
![]() |
![]() |
![]() |
#100 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,626
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#101 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,208
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
|
![]() |
![]() |
![]() |
#102 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,626
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
|
![]() |
![]() |
![]() |
#103 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,208
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
Quote:
![]() The Editor already has a tool to upgrade to epub3. I just made a small modification to preserve the <guide> element. Also, to be automated, I added the options to the chain config dialog, this way it can be configured beforehand. Unfortunately, the Editor has no tool to downgrade from epub3 to epub2, so I can't help you there. |
|
![]() |
![]() |
![]() |
#104 |
Enthusiast
![]() Posts: 33
Karma: 10
Join Date: Feb 2011
Device: Android Tablet
|
Dumb question, but I try: is there away to create a shortcut to a couple of saved searches, but without replacing anything?
|
![]() |
![]() |
![]() |
#105 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,012
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Even if you did a change, just abort (Exit without save). ![]() BUT .... You can just fill out the S&R box . Right-click in the FIND box: Save current search |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Editor Plugin] EpubCheck | Doitsu | Plugins | 215 | 05-22-2025 01:45 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 |