User access to key="values and parms" handling

Hi.

As you know widget parameters of the form key=“values and parms” are used every where. Each pair is white space delimited and there is a set of rules to interpret the delimiters around the value. If we include within macro definitions the key:“value” also tiddlywiki contains the code to handle both forms.

Is there an existing method to parse a string with one or more key/value pairs and perhaps return variables with the key as its name and the value?

This could be useful for a number of reasons;

  • searching for keys or parameter use and obtaining the value set
  • a simple way for users to supply config info
  • the posibilty to place other info into the one field in relation to that field
  • create a form of commandline for user config or variables.
  • parsing values in macro definitions.
  • a debug tool for users to interactivly overide an existing variable value.

Issues

  • it would help if such strings of parameters could be referenced directly in a widget or macro. Eg <$list {{!!list-params}}>
  • although existing methods exist it would be nice also to provide the reverse, a list of variables and field names to generate key=value or key:value pairs.

Note:

More often than not we would want the values of the resulting variables to be used within widgets, macros and filters so it would make sence to first wikify the value when setting the variable and not wait until rendered eg if a value contained wiki text or transclusions.

Key={{transclusion}} or
Key={{!!transclusion}}

Post script
A form of set multiple variables that included appropriate operators to extract the key value pairs may be the way to go.