View Single Post
Old 04-13-2021, 11:59 AM   #521
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,200
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
Version 1.7.0
  • Update: Add persistent storage for templates. Can be accessed using these new template functions: persistent_vars(), set_persistent_vars(), list_persistent_vars(), delete_persistent_vars(), list_persistent_namespaces(), delete_persistent_namespaces()
  • Update: Copy To Clipboard: Add option to write to a file.
  • Update: Chain Variables: Add option to ask for variables at runtime.
  • Update: Library View Double Clicked: tweak to allow single click edit (action_chains_single_click_edit).
  • Update: Add a tweak to allow disabling submenu inheriting first action icon (action_chains_default_sub_menu_icon).
  • Update: Update the way table state is saved to avoid messing it up every-time a new column is added.
  • Update: Add options to customize scope icon and tooltip.
  • Update: Add new template function: list_book_vars()

The new persistent storage allows template functions to save data permanently. Here is how you can save a variable to persistent storage:

Code:
set_persistent_vars('name', 'value')
It also supports namespace hierarchies as well for more flexible structure. For example if you want to save the same variable name but with a different value for each library, use the third argument as the namespace:

Code:
set_persistent_vars('name', 'value', current_library_name())
If you want to store permanent book vars (the same variable with different value per book per library), use a hierarchical namespace (in the form of library_name.book_id):

Code:
ns = strcat(current_library_name(), '.', field(id));
set_persistent_vars('name', 'value', ns)
You retrieve the value in the same way

Code:
ns = strcat(current_library_name(), '.', field(id));
persistent_vars('name', ns)
@ownedbycats: The new file option in the Copy To Clipboard action might solve your problems with command line limit if the program you are using supports reading filenames from a file. You can output you data to a file using Copy To Clipboard, and feed the file to the Open With action using the template option.

Finally, the action_chains_single_click_edit tweak makes it possible still edit by single clicking, which you lose when you set the tweak (in case you want to connect the double click event to a chain):

Code:
doubleclick_on_library_view = 'do_nothing'
Unfortunately, there is bug there where it also open the field editor when double clicking as well. I don't know the cause for this, so if anyone can help with this.
capink is offline   Reply With Quote