View Single Post
Old 01-31-2025, 11:18 AM   #1424
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,199
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
To set a chain variable using python
Code:
chain.set_chain_vars({'variable_name': 'variable_value'})
To retrieve the variable using python:
Code:
chain.chain_vars.get('variable_name', '')
To retrieve the variable using calibre template language:
Code:
program:
    my_retrieved_variable = globals(variable_name)
If you want to set a chain variable without using python, you can use the Chain Variables action.
capink is offline   Reply With Quote