Index: index.html =================================================================== --- index.html (revision 2168) +++ index.html (revision 2169) @@ -37,6 +37,7 @@
  • If you are an user, read the user documentation
  • If you are an programmer, read the user documentation and the programmer documentation
  • If you are a plugin programmer, there's a plugin programmer's conf checklist that summarizes what to do +
  • In any case, these links may help: syntax, config files, priority handling Index: index_user.html =================================================================== --- index_user.html (revision 2168) +++ index_user.html (revision 2169) @@ -2,7 +2,7 @@

    The new config system in pcb-rnd

    User documentation

    -As of 1.1.0, pcb-rnd switched to a lihata based configuration system. +As of 1.1.0, pcb-rnd switched to a lihata based configuration system. The purpose of this document is to describes the basic system design going into enough details to provide the user with full control over the configuration. The other side, how the system is implemented is described in the Index: prio.html =================================================================== --- prio.html (revision 2168) +++ prio.html (revision 2169) @@ -3,5 +3,20 @@

    The new config system in pcb-rnd

    Priorities

    -TODO: needs a few design decisions before it an be documented +Priority is an integer property of each config root. +Syntax-wise it is part of the name of the config +root. In the lihata config file it is either specified or omitted. When +omitted, a role dependent default value is +used. The default values are chosen in an intuitive way, thus most +commonly the priority value is omitted. +

    +For scalar settings, the highest priority +value determines the final value of a setting after the merge. If there +is a tie, role decides: the role closer to the CLI is stronger. +

    +For lists and arrays, priority determines the +order of merge, which changes the order of itmes in the final list as +config roots prepend and append items. + + Index: syntax.html =================================================================== --- syntax.html (nonexistent) +++ syntax.html (revision 2169) @@ -0,0 +1,45 @@ + + +

    The new config system in pcb-rnd

    +

    Config file syntax

    + +The config file sytnax is lihata. +Most users don't need to understand most of the syntax, just follow the +patterns seen in the examples. A few thumb of rules: + + +

    config root syntax

    +

    +A pcb-rnd config file, (or document for short) has a single root +node whose name must be li:pcb-rnd-conf-v1 - this is the signature of the +document. It is a flat list of one or more config root/ subtrees. +TODO: is this really a list or a hash? +

    +Each config root is a partial description of the + config tree (which is the logical +confgiuration of all possible settings). Config roots have a policy and +a priority attached. This is done in the name +of the config root, which must be of the form of policy-priority, +e.g. "overwrite-300" or "append-125". The priority part (with the dash) +can be omitted (and then the per role default priority is used), e.g. +"overwrite" or "append" are valid config root names. +

    +Under the config root, a tree of sections (hashes) and setting values +(text nodes) are built. These structures and values are in 1:1 +correspondance with the config tree. Excess +(unknown) keys are considered a warning (except in the plugin/ and +utils/ subtrees). Missing keys or missing subtrees is normal because a config +root can be partial. +

    +TODO: examples + +

    list syntax

    +TODO: list syntax + +

    in project files

    +TODO