#5 Add a configuration file parsing/loading

오픈
yannweb4 년 전을 오픈 · 0개의 코멘트
yannweb 코멘트됨, 4 년 전

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 added this to the BETA version milestone 4 년 전
yannweb added the
enhancement
label 4 년 전
yannweb added the
_core
label 4 년 전
로그인하여 이 대화에 참여
마일스톤 없음
No Assignees
참여자 1명
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
취소
저장
아직 콘텐츠가 없습니다.