#5 Add a configuration file parsing/loading

Ouvert
créé il y a 4 ans par yannweb · 0 commentaires
yannweb a commenté il y a 4 ans

for the moment no std libraries for configuration file parsing has been found… The idea is to implement a simple ini file parser.

Configuration files will be in flat-ini (no sections), using CLI options (long & short ? or just long ?) as key.

A file line will be composed like : [KEY]‘=’[VALUE]’\n’

Two types of value are allowed :

  • with escape char support : value is surrounded by “ or ‘ chr. This values supports \x chr and can contain line returns ‘\n’ chr
  • with no escape support : value is the string between the = and the next ‘\n’ chr

Note : This piece of code, with options + help definition, the help text generation, etc. should latter be extracted in a library allowing an unified CLI + configuration files handling.

__for the moment no std libraries for configuration file parsing has been found... The idea is to implement a simple ini file parser.__ Configuration files will be in flat-ini (no sections), using CLI options (long & short ? or just long ?) as key. A file line will be composed like : <code>[KEY]'='[VALUE]'\n'</code> Two types of value are allowed : - with escape char support : value is surrounded by " or ' chr. This values supports \x chr and can contain line returns '\n' chr - with no escape support : value is the string between the = and the next '\n' chr __Note :__ This piece of code, with options + help definition, the help text generation, etc. should latter be extracted in a library allowing an unified CLI + configuration files handling.
yannweb a ajouté cela au jalon BETA version il y a 4 ans
yannweb a ajouté l'étiquette
enhancement
il y a 4 ans
yannweb a ajouté l'étiquette
_core
il y a 4 ans
Connectez-vous pour rejoindre cette conversation.
Aucun jalon
Pas d'assignataires
1 participants
Échéance

Aucune échéance n'a été définie.

Dépendances

Ce ticket n'a actuellement pas de dépendance.

Loading…
Annuler
Enregistrer
Il n'existe pas encore de contenu.