Inquiry: Improve documentation on .OVR (override) configuration files and their syntax


porg

Active Member
Joined
Oct 6, 2008
Messages
792
Location
Vienna, Austria
These two resources:


do not mention…


[*]… how to make a comment within a .OVR file
  • if it follows the .INI standard, a comment would be achieved by preceding the line with a ";" (semicolon character).

Someone who has certainty/knowledge about this, please update my cited resources accordingly. Thanks!
 
ovr files are a "pnd conf" file; ie: same as the conf files for libpnd (which makes sense, as libpnd is more or less self contained. So it has a conf file parser for its own conf files, and uses it for ovr's as well.)

See:

https://github.com/skeezix/libpnd-clone/blob/master/include/pnd_conf.h

Read that header, up at the top it describes itself. ie: copy and pasta most (not all) of that bit is here.

Comment is '#' started as noted.

Feel free to stick some detail in the wiki, if you have a moment. I'm as usual RL strapped lately :(

/* Config file format

* Since we're sticking configs in homedirs and /etc, it seems inappropriate to use XML; further

* of course, XML means a heavy duty parser (expat or something at least) when people really just

* use grep on these guys. Still, XML would afford us unicode which would be nice..

* Anyway, the very basic format of the config file supported herein is derived from .ini really

* (sorry!)

*

* [section]

* key value #comment

*

* Comments and leading/trailing space is removed; embedded space is left.

*

* Thats it; internally, 'section' is prepended to all keys, so it looks something like this.

* Section can be [] to mean 'back to the top level.' I had

* considered having no decorations around [section] (which is to say, a key with no value) but

* I could see cases where folks want to have a valueless key, without something goofy like value

* 'present' 'on' '0', when they just want a key 'use-foo' and don't want 'use foo' value 'no'

* that feals yes/no-ey.

*

* NOTE: If a key is present in a config twice.. well, too bad. No warning is made.

*

* autodiscovery:

* path /mnt/sd1/my/path

*

* Internally becomes:

*

* autodiscovery.path -> /mnt/sd1/my/path
 
I do not have enough time to update the wiki regarding PND configuration file format.

Was intended as an inquiry and in consequence a delegation to some volunteer ;-)
 
Back
Top