Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 09-17-2025, 03:48 PM   #1546
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,394
Karma: 80947541
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Suggestion: Add link to AC Resources in the first post of thread.
ownedbycats is offline   Reply With Quote
Old 09-18-2025, 01:55 AM   #1547
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,216
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by ownedbycats View Post
Suggestion: Add link to AC Resources in the first post of thread.
There has been a link from the start under the entry: Custom actions and events.
capink is offline   Reply With Quote
Advert
Old 09-18-2025, 05:49 AM   #1548
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,216
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
@un_pogaz, @ownedbycats

I posted a custom action here that addresses the filtering problem, without the need for using templates.
  • The user can use the action to save current selections to a named variable (e.g. chain_selected_ids, previously_selected_ids, third_action_ids .... etc)
  • The user can restore the selections from a named variable.
  • The user can apply a regular calibre search that will limit the selection to a subset of one of the following:
    • Currently selected books.
    • Book ids stored in a variable
    • Books in current scope

Notes:
  • Regular calibre search allows for using templates. You consult the calibre search documentation, looking for the section named: "Search using templates"
  • The selection is going to be limited by the current library view including the search vls applied. To clear those, you can use the builtin "Selection Modifier". There is no need to duplicate the same functionality.
  • The action is called "Subset Selector" for lack of better name. More descriptive suggestions are welcome.
  • The action will not be part of the stock plugin until it fully matures and has a stable api.
Attached Thumbnails
Click image for larger version

Name:	1.jpg
Views:	103
Size:	43.0 KB
ID:	218138   Click image for larger version

Name:	2.jpg
Views:	92
Size:	38.1 KB
ID:	218139  
capink is offline   Reply With Quote
Old 09-18-2025, 11:55 AM   #1549
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,216
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by Terisa de morgan View Post
Here it is
Please export the chain into an importable zip file (right click the chain in the chain dialog > export).
capink is offline   Reply With Quote
Old 09-18-2025, 04:46 PM   #1550
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,693
Karma: 13151331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by capink View Post
Please export the chain into an importable zip file (right click the chain in the chain dialog > export).
Yes, sorry. Export is attached.
Attached Files
File Type: zip Chain.zip (438.1 KB, 81 views)
Terisa de morgan is offline   Reply With Quote
Advert
Old 09-19-2025, 02:02 AM   #1551
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,216
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
There are two issues I can detect:
  • The following condition does not result in a consistent type of output

    Code:
    program:
        if field_exists("#ong") then
            1.00
        fi
    It should be modified as follows:

    Code:
    program:
        if field_exists("#ong") then
            1.00
        else
            0
        fi
    Because the condition evaluator is expecting a number even if the "if statement" evaluates to false. They way you wrote the condition, when the "#ong" column is absent, the template output is an empty string. The condition evaluator tries to convert the empty string to number and fails.
  • If you modify the condition as described, the chain is still not going to run if either the #lector or #prox columns are absent, because unlike what you did with the #ong condition, you did not tick the checkbox "Disable action validation if conditions are not met"

I tried the chain after modifying the condition above, and after creating the #lector and #prox columns in a test library, and it runs fine (I deleted the My Tools action as I do not have it on my system).
capink is offline   Reply With Quote
Old 09-19-2025, 03:04 AM   #1552
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,693
Karma: 13151331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by capink View Post
There are two issues I can detect:
  • The following condition does not result in a consistent type of output

    Code:
    program:
        if field_exists("#ong") then
            1.00
        fi
    It should be modified as follows:

    Code:
    program:
        if field_exists("#ong") then
            1.00
        else
            0
        fi
    Because the condition evaluator is expecting a number even if the "if statement" evaluates to false. They way you wrote the condition, when the "#ong" column is absent, the template output is an empty string. The condition evaluator tries to convert the empty string to number and fails.
  • If you modify the condition as described, the chain is still not going to run if either the #lector or #prox columns are absent, because unlike what you did with the #ong condition, you did not tick the checkbox "Disable action validation if conditions are not met"

I tried the chain after modifying the condition above, and after creating the #lector and #prox columns in a test library, and it runs fine (I deleted the My Tools action as I do not have it on my system).
Thank you very much! The change to number was only to try something different, and it's bad luck I checked the only one with that checkbox ticked. And yes, My Tools is a personal plugin, sorry not having removed it.

Terisa de morgan is offline   Reply With Quote
Old 10-05-2025, 04:10 AM   #1553
un_pogaz
Chalut o/
un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.
 
un_pogaz's Avatar
 
Posts: 495
Karma: 678910
Join Date: Dec 2017
Device: Kobo
The latest version of Quality Check (1.14.4) contain a support for the Actions Chains API. This is limited only to the Fix actions because that the only one that edit book metadata (when the other are only lookup actions that don't realy match with the scope of Actions Chains).
Technically, it was added into the 1.14.3, but it never was published and deployed on Mobilread.

Also, some Fix actions of Quality Check can replace certain User Action (Bulk Sort Key and Re-calc Book Size for example).

Last edited by un_pogaz; 10-05-2025 at 04:14 AM.
un_pogaz is offline   Reply With Quote
Old 10-06-2025, 07:28 AM   #1554
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: 81,086
Karma: 150263703
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 un_pogaz View Post
The latest version of Quality Check (1.14.4) contain a support for the Actions Chains API. This is limited only to the Fix actions because that the only one that edit book metadata (when the other are only lookup actions that don't realy match with the scope of Actions Chains).
Technically, it was added into the 1.14.3, but it never was published and deployed on Mobilread.

Also, some Fix actions of Quality Check can replace certain User Action (Bulk Sort Key and Re-calc Book Size for example).
It would also be good if Action Chains can also work with the search from Quality Check. Then you can do what you want based on the output of the search.
JSWolf is offline   Reply With Quote
Old 10-23-2025, 12:48 AM   #1555
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,394
Karma: 80947541
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Just curious:

A FanFicFare-related chain opens a dialog so I can copy something, then SFE to paste it into a longtext column. Is action to insert clipboard contents directly to column?
ownedbycats is offline   Reply With Quote
Old 10-23-2025, 07:48 AM   #1556
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,216
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by ownedbycats View Post
Just curious:

A FanFicFare-related chain opens a dialog so I can copy something, then SFE to paste it into a longtext column. Is action to insert clipboard contents directly to column?
Create a custom from_clipboard() template function, by copy/paste into the module manager:

Code:
from qt.core import QApplication
from calibre_plugins.action_chains.templates import TemplateFunction

class FromClipboard(TemplateFunction):

    name = 'from_clipboard'
    arg_count = 0

    def evaluate(self, formatter, kwargs, mi, locals):
        return QApplication.clipboard().text()
capink is offline   Reply With Quote
Old 10-26-2025, 02:09 PM   #1557
ThreeLizards
Enthusiast
ThreeLizards began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Feb 2025
Device: Kindle Paperwhite 2024
Hi!

I'm trying to get action chain to do a thing where if the title contains 'Anthology' then it'll pick a update anthology in fanficfare. But I can't get the title thing working. It only seems to recognize the full title, like not just if it contains something. How do I work that in the evaluate condition thing?

Thank you for the help!
ThreeLizards is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Action Chains Resources capink Plugins 80 09-18-2025 05:45 AM
[Editor Plugin] Editor Chains capink Plugins 106 06-17-2025 06:36 PM
[GUI Plugin] Noosfere_util, a companion plugin to noosfere DB lrpirlet Plugins 2 08-18-2022 04:15 PM
[GUI Plugin] Save Virtual Libraries To Column (GUI) chaley Plugins 14 04-04-2021 06:25 AM


All times are GMT -4. The time now is 02:50 PM.


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