-
Hi all. :) I'm hoping someone can please advise of the configuration file format for pyLoad. It's not a format I've seen before. Example:
I need to extract specific values from within BASH, so I'm wondering if a parser already exists to read it. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
First line is file format version (always 2). Each section contains configuration line |
Beta Was this translation helpful? Give feedback.
First line is file format version (always 2).
The has file sections, each section line can be parsed using regex (python regex notation)
(.+?)\s+-\s+"(.+?)":
,first group in the regex is the section name, group 2 is the section title.
Each section contains configuration line
\s*(?P<T>.+?)\s+(?P<N>[^ ]+?)\s*:\s*"(?P<D>.+?)"\s*=\s?(?P<V>.*)
Group T - type (bool, int, ip, time , list of values)
Group N - name
Group D - description
Group V - value