You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.
Elektra's goal is to integrate current forms of configuration files. The best way to integrate them is to use ready-made parsers, then Elektra uses exactly the same code to access configuration files as the application. Some ideas for such libraries (random order):
in kdbGet you first you look into the string of the parentKey and open the configuration file of this name. Then you iterate over all keys you get from the library and transform them into a keyset.
in kdbSet you do the opposite: you iterate over the keyset and feed it to the library. Again you use the string of the parentKey to know where to write the content to.
As an extension to the more common formats above I'd like to suggest: https://kdl.dev/
It's hierarchical, supports multiple values per node (= arrays) and nodes can have additional named properties (= metadata). I think the format can store the same data as a KeySet. There are also suitable parsers in Rust and C (among other languages).
@markus2330 Should we offer this issue for the FLOSS course?
I rather not advertise it. Writing a useful storage plugin (also preserving order, comments etc.) is not so easy. And storage plugins need maintenance afterwards, as it takes some time to find tricky issues. So I would prefer if someone improves e.g. TOML (#4466#3478) than creating a new storage plugin.
Hello newcomer,
Elektra's goal is to integrate current forms of configuration files. The best way to integrate them is to use ready-made parsers, then Elektra uses exactly the same code to access configuration files as the application. Some ideas for such libraries (random order):
You should prefer to pick the ones you are familar with, which are popular, are well maintained, and provide a easy-to-use API.
To get support for a new file format with a new parser, you have to create a new plugin (see https://github.com/ElektraInitiative/libelektra/blob/master/doc/tutorials/plugins.md and https://github.com/ElektraInitiative/libelektra/blob/master/doc/tutorials/storage-plugins.md). You only have to implement kdbGet and kdbSet:
A Plugin that already does exactly this are https://tree.libelektra.org/src/plugins/ni (you can ignore metakey and metavalue for a first step)
To complete the task, please:
Please write something below before starting the task. You can always ask here for help.
The text was updated successfully, but these errors were encountered: