Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make interface colors customizable #9

Open
unxed opened this issue Dec 2, 2020 · 8 comments
Open

Make interface colors customizable #9

unxed opened this issue Dec 2, 2020 · 8 comments

Comments

@unxed
Copy link
Contributor

unxed commented Dec 2, 2020

For sure turbo vision should allow this :)

@magiblot
Copy link
Owner

magiblot commented Dec 3, 2020

The main setback here is that I have to choose a configuration system, but I have never used one. Configuration files should be human-readable. Any suggestions?

@okbob
Copy link

okbob commented Dec 3, 2020 via email

@okbob
Copy link

okbob commented Dec 3, 2020 via email

@unxed
Copy link
Contributor Author

unxed commented Dec 3, 2020

The main setback here is that I have to choose a configuration system, but I have never used one. Configuration files should be human-readable. Any suggestions?

Why not to use well-known .ini file syntax?
For example, this is ready to use code to work with it from far2l (GPLv2):
https://github.com/elfmz/far2l/blob/master/utils/src/KeyFileHelper.cpp

@exebook
Copy link

exebook commented Dec 23, 2020

JSON!

@magiblot
Copy link
Owner

Hey exebook,

JSON!

Yeah, I also think JSON makes everything simpler. But I'm not sure plain JSON is good enough, as it doesn't support comments. libconfig not only is adapted to the use case of storing configuration, but also uses a syntax very similar to JSON: http://hyperrealm.github.io/libconfig/libconfig_manual.html#Configuration-Files.

@exebook
Copy link

exebook commented Dec 24, 2020

JSON allows /* */ AFAIK but not //. But anyway you can strip comments before calling JSONParse in your library of choice. Also you can put your comments in string properties like { comment: "blah" }

@ziotom78
Copy link

ziotom78 commented Dec 4, 2023

JSON allows /* */ AFAIK but not //. But anyway you can strip comments before calling JSONParse in your library of choice. Also you can put your comments in string properties like { comment: "blah" }

I know for sure that a few JSON parsers recognize comments, but this does not seem to be in the standard; it is however supported by JSON5.

Another option could be to use TOML: it was designed specifically for configuration files written by humans, it looks reasonably similar to INI files, it is easy to support it in C++ because there are header-only libraries, it is widely used and so it's likely that people already know how to write TOML files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants