Warning, /utilities/konsole/tools/uni2characterwidth/template.example is written in an unsupported language. File is not indexed.

0001 «*COMMENT:----------------------------------------------------------------------
0002 
0003 Tags:
0004 
0005 «*anything:comment where everything but closing sequence is allowed:anything*»
0006 
0007 «NAME:any content, including other tags. \: have to be escaped. It is processed
0008 using data passed from code() function under NAME key. It should contain other
0009 tags, without them this text will be replaced with passed data or removed.»
0010 
0011 «NAME» - like before, used when data should replace it, so content is
0012          unnecessary
0013 
0014 EXAMPLE:
0015 data:     Map{ "exampleA", Map{ { "Number", 42 }, { "String", "hello" } } }
0016 template: «exampleA:number\: «Number», string\: «String»»
0017 result:   number: 42, string: hello
0018 
0019 «» - empty anonymous element. Used in named elements which receive lists.
0020      The element will be replaced with list item, and duplicated if
0021 
0022 «:anonymous container. It should contain some elements which receive data.
0023 The element will disappear when child element will not receive any value.
0024 Useful to add suffixes/prefixes to data»
0025 
0026 EXAMPLE:
0027 data:     Map{ "exampleB", Vector{ 1, 2, 3, 4, 5, 6, 7 } }
0028 template: «exampleB:«:[«»] »»
0029 result:   [1] [2] [3] [4] [5] [6] [7]
0030 
0031 data:     Map{ "exampleC", Vector{ "a", "b", "c" } }
0032 template: «exampleC:«:first = «»»«:, second = «»»«:, third = «»»«:, fourth = «»»»
0033 result:   first = a, second = b, third = c
0034 
0035 «!fmt "XXX":a wrapper which sets printf-like format XXX for numbers and
0036 strings inside it. Starts with %.»
0037 
0038 «!repeat N:repeats contents inside N times.»
0039 
0040 EXAMPLE:
0041 data:     Map{ "exampleD", Vector{ 1, 2, 3, 4, 10, 11, 12, 13 } }
0042 template: «exampleD:«!fmt "%#.2x":«!repeat 3:«» »«»; »»
0043 result:   0x01 0x02 0x03 0x04; 0x0a 0x0b 0x0c 0x0d;
0044 
0045 D: «exampleD:«!fmt "%#.2x":«!repeat 3:«» »«»; »»
0046 ----------------------------------------------------------------------:COMMENT*»
0047 For available data see code() function. Below are usage examples
0048 
0049 Warning about generated file - putting "this is a generated file" text in a
0050 template file could be misleading.
0051 «gen-file-warning»
0052 
0053 
0054 Command used to generate the file:
0055 «cmdline»
0056 
0057 
0058 Direct LUT - widths of the first 256 code points in direct access array:
0059 {«!fmt "% d":«direct-lut:
0060     «!repeat 32:«:«»,»»
0061 »»}
0062 
0063 
0064 Arrays with code point ranges for every width:
0065 «ranges-luts:«:
0066 «name» = {«!fmt "%#.6x":«ranges:
0067     «!repeat 8:«:{«first»,«last»},»»
0068 »»}
0069 Number of elements in the array: «size»
0070 
0071 »»
0072 List of array names, sizes, and widths:
0073 {«ranges-lut-list:
0074     «:{«!fmt "% d":«width»», «!fmt "%-16s":«name»», «size»},»
0075 »}
0076 Number of elements in the array: «ranges-lut-list-size»;
0077