![]() |
#256 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,196
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
|
No. Action chains does not give you the ability to name templates. This can already be done in calibre using stored templates (preferences > template functions).
Action chains only gives you the ability to set an icon and a tooltip for the condition, to be used as kind of visual cue of which conditions this action/chain will run under. |
![]() |
![]() |
![]() |
#257 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,013
Karma: 500000
Join Date: Jun 2015
Device: Rocketbook, kobo aura h2o, kobo forma, kobo libra color
|
Quote:
Would it be possible to either add a button in the plugin dialog to bring that up, or at least mention it in the post documenting conditions? Or is it there and I missed it? |
|
![]() |
![]() |
Advert | |
|
![]() |
#258 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,196
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
|
What version of the plugin are you using? The tooltip and icon fields are in the conditions dialog right at the bottom. If you mean you want a button to calibre's stored templates, I can add that.
|
![]() |
![]() |
![]() |
#259 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,013
Karma: 500000
Join Date: Jun 2015
Device: Rocketbook, kobo aura h2o, kobo forma, kobo libra color
|
I just noticed clicking on the pulldown like a button opens the template editor.
Somehow I never thought to try that before. |
![]() |
![]() |
![]() |
#260 | |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,011
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Quote:
Another question: If I want to switch to a saved search at the end of a chain, is Selection Modifier the right way to do that? |
|
![]() |
![]() |
Advert | |
|
![]() |
#261 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,196
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
|
Quote:
If you want to just display the search results without making any selections, you can use this custom action instead, just type the following in the template dialog: Code:
search:"=my_saved_search" |
|
![]() |
![]() |
![]() |
#262 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,636
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
I have a doubt. Let's say I have an action that includes to set some custom columns, that doesn't exist in all the libraries. Is it possible to execute the part that is common in all the libraries and the part about custom columns only in the libraries where they exist?
|
![]() |
![]() |
![]() |
#263 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,448
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
![]() |
![]() |
![]() |
#264 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,636
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#265 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,448
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
![]() |
![]() |
![]() |
#266 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,196
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
|
chaley's new template function is a lot better than setting conditions with library name.
The problem with both approaches is that the plugin will validate each action in the chain before running it, and if single action has problems (e.g custom column not in current library) the whole chain will be disabled. I will see what is the best approach to deal with this. |
![]() |
![]() |
![]() |
#267 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,636
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Quote:
|
|
![]() |
![]() |
![]() |
#268 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,196
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
|
The condition chaley suggested is per action. It is currently not going to work. I think the solution to this would be to validate only actions that are going to run under the current conditions. So if you set a condition on an action using chaley's new function, the action will only be validated if the condition is true. I hope the explanation makes sense.
|
![]() |
![]() |
![]() |
#269 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,448
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
However, unless I am misunderstanding I don't think the problem is as large as you indicate, at least for template actions. Looking at check_template() I see that the template is run to see if it produces an error. Assume the template looks something like this Code:
program: if field_exists('#somefield') then do_something(); do_something_else() fi |
|
![]() |
![]() |
![]() |
#270 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,636
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Quote:
So, essentially, instead of using "Edit Metadata", I use a function with that template that set the value of the column if it exists. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Editor Plugin] Editor Chains | capink | Plugins | 106 | 06-17-2025 05:36 PM |
Action Chains Resources | capink | Plugins | 77 | 06-16-2025 12:45 PM |
[GUI Plugin] Noosfere_util, a companion plugin to noosfere DB | lrpirlet | Plugins | 2 | 08-18-2022 03:15 PM |
[GUI Plugin] Save Virtual Libraries To Column (GUI) | chaley | Plugins | 14 | 04-04-2021 05:25 AM |