標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

最近の作業部屋活動履歴

2023-12-31
2023-12-03
2023-11-11
2023-11-05
2023-11-02
2023-07-13
2023-04-06

最近のWikiの更新 (Recent Changes)

2023-03-26
2023-03-19
2023-03-14
2023-03-11

Wikiガイド(Guide)

サイドバー (Side Bar)

CNI Info

This is just a brief overview if CNI, you can also check out the API for the CNI module.

I've also made a local copy of the CNI Specification that cni.d conforms to, but there original can be found at https://github.com/libuconf/cni .

Syntax

The syntax of CNI is very similar to INI files, where you have a [section] which can act as a namespace for settings, along with a option = value line. The reason to use CNI over INI are few, but important: there is a defined specification (which can allow for verification of files and tooling support), inline comments, and "raw values" (which can allow you to have a value which spans multiple lines, includes excess whitespace, etc.).

[Program Settings]
# Where do we store user configuration?
CONFIG_DIRECTORY=/home/username/.local/config
# Where do we store our data?
DATA_DIRECTORY=/home/username/.local/share

USER_BIO=`This is a user bio that we display when the information is required to be display,
the value is multi-line and "raw" so we can include a good-old # without it being a comment.`

History

Shortly after beginning medialist-cli, I stumbled across Trivial Technology (TT) (probably the motivator for making this project 0BSD), which is about making projects which are small and simple to understand; and providing the greatest access to software by making it public domain. While interesting, not exactly something I was going to jump on board straight away. Regardless, I took a look at the author's projects where I found CNI. The idea of having a configuration format with a defined specification (and was easily understandable) was appealing, and thus I added it to the TODO file in 2021.

After a few different attempts of making a CNI library (first in C, then in C++), I decided on actually keeping it written in D. So, after a brisk year and a half, I decided to actually make the change and swap from INI to CNI.

Versions

Version 0.1.0 is the initial version, which does conform with CNI 0.1.0 (core: 29/29, ini: compliant, ext: more-keys).

In future versions I would like to implement the "suggested API", along with an API which matches ConfigParser.