View Single Post
Old 12-29-2021, 12:30 PM   #772
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,203
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by ownedbycats View Post
how would the variations work for this case? From what I understand, it changes the menu entry depending on...things, but whether I want to add a book to the TBR list is something I decide myself.
By using the variant argument in a condition.

It should be as follows:
  • Make sure you have the experimental mode on by adding the following tweak (requires restarting):
    Code:
    action_chains_experimental = True
  • Use the chain variation template dialog to add your two variants as follows:
    Code:
    program:
        add_chain_variant('Send to Device','add_no');
        add_chain_variant('Send to Device + Add to TBR.','add_yes');
    The argument highlighted in blue will be passed to the chain and can be accessed later for enabling/disabling an action.
  • Add the following condition to the 'add to reading list' action:
    Code:
    Template : program: globals(_variant_argument)
    Comparison : =
    Value : add_yes

Now you should have two variants. Only one of them will pass the argument that satisfies the condition for running the 'add to reading list' action.

Last edited by capink; 12-29-2021 at 04:55 PM.
capink is offline   Reply With Quote