Re: [dev] Config files

From: Nick <suckless-dev_AT_njw.me.uk>
Date: Wed, 9 Feb 2011 18:44:00 +0000

Quoth crap_AT_wzff.de:
> In case you're too lazy to write your own parser, this is a fairly "suckless"
> ini library: http://ndevilla.free.fr/iniparser/

Thanks for the pointer, though for my needs that's still
significantly larger and more featureful than I need.

Quoth crap_AT_wzff.de:
> An alternative to this would be exporting these variables as environment
> variables. This way you don't have to do any parsing on your own (well, maybe
> inside the strings but not externally). Of course it only works for very simple
> use cases which don't need dozens of variables

I'm not an enormous fan of using environment variables like this.
I don't want to create some wrapper script setting variables each
time I run it; it just seems too cumbersome to me.

Anyway, I've written some nice little config parsing based on cls'
suggestion, which I think is lovely, and I'll endeavour to share
with the list tomorrow.

Nick

Received on Wed Feb 09 2011 - 19:44:00 CET

This archive was generated by hypermail 2.2.0 : Wed Feb 09 2011 - 19:36:02 CET