Quote:
Originally Posted by capink
The idea of template modifying values that are remembered between invocations is interesting.
|
I submitted changes to Kovid to implement set_globals().
EDIT: The changes are now in master source.
Quote:
I think the action and the display should be separated. We run the action that iterates over selected books, and modify the global dict. After that the display can be handled by the formulas action, which already has access to the global dict. This way, any other action that uses templates, can be preceded by this new action (now that the display is optional and separate), and access whatever values it writes to the global dict.
|
I think you are right, this way permits more generality. One could run more than one iterative template, perhaps separated by other actions. Then when ready the user would ask that the values be displayed. Or perhaps the computed values would be used in action that modifies metadata.
Quote:
This action can be tested now as a custom action, before it is included in the plugin.
|
This is why I added set_globals. Getting some usage feedback would be good.
Quote:
I still have to ponder on this for sometime, before jumping into final implementation, to get it right first. I am also struggling with name of this new action. Changing it later would break compatibility. Maybe someone can help.
Edit: Maybe make the display part of the same action, and make it optional instead. Not yet sure about this.
|
Yes, getting it right first time is a good thing.