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-29-2024, 01:21 PM   #91
thiago.eec
Wizard
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: 1,073
Karma: 1221485
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Quote:
Originally Posted by capink View Post
I uploaded a new version that should fix both issues. Please try and report back.
All good now. Thanks.
thiago.eec is offline   Reply With Quote
Old 07-02-2024, 08:55 PM   #92
zencricket
Junior Member
zencricket began at the beginning.
 
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.
zencricket is offline   Reply With Quote
Old 07-03-2024, 04:22 AM   #93
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,139
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by zencricket View Post
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.
Not all editor chains can be run from action chains. This depends on the actions as well as the settings of individual actions. This happens mainly when an action depends on elements of Editor GUI which won't be available when run from Action Chains.

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:
Originally Posted by zencricket View Post
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.
Run calibre in debug mode and post the output.
Quote:
Originally Posted by zencricket View Post
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.
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 04:53 AM.
capink is offline   Reply With Quote
Old 07-03-2024, 05:19 PM   #94
zencricket
Junior Member
zencricket began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jul 2024
Device: kindle paperwhite
Quote:
Originally Posted by capink View Post
Not all editor chains can be run from action chains. This depends on the actions as well as the settings of individual actions. This happens mainly when an action depends on elements of Editor GUI which won't be available when run from Action Chains.

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"



Run calibre in debug mode and post the output.


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.
Got the actions working. I changed to scope to "text files" and it runs when triggered manually. When I tie it to the FanFicFare event I see the action run in the logs, but no changes are made when it is complete. Any ideas?

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.)
zencricket is offline   Reply With Quote
Old 07-03-2024, 08:26 PM   #95
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,139
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by zencricket View Post
When I tie it to the FanFicFare event I see the action run in the logs, but no changes are made when it is complete. Any ideas?
Cannot tell exactly without knowing seeing the chains and the files they are acting on.

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 06:13 AM.
capink is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Editor Plugin] EpubCheck Doitsu Plugins 163 07-23-2024 09:07 AM
[Editor Plugin] LanguageTool Doitsu Plugins 17 04-20-2024 03:21 PM
[Editor Plugin] - Enabling 'Customize plugin' dialog directly from the Editor thiago.eec Development 7 01-09-2019 09:05 PM
Sample Plugin for the Editor DiapDealer Editor 77 12-10-2014 08:16 AM
Editor plugin question DiapDealer Development 2 07-28-2014 11:23 PM


All times are GMT -4. The time now is 07:01 AM.


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