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.