econf 1.0.1
EConf Library
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
EConf
EConf - A configuration file format designed to combine two qualities - simplicity and high parsing speed. Well, I hope it worked out!
Advantages:
- Simplicity (easy to edit, takes up little space);
- High parsing speed.
Disadvantages:
- Low popularity.
Installation
To install this package in DUB, you need to register "grub install conf" in the console of your project.
Work
To begin with, import the module via "import econf;".
Next, create an EConf class with an argument in the form of an EConf code.
To get values, you can use the get template. (there are: an integer, a string, a floating-point number, a hexadecimal number, arrays of each of them and an object). To get values from an object, use its obj_child array.
To create a new value, use put. Also, in order to get the EConf code, use toksToString.
About the EConf syntax
To begin with, let me show you two codes: one is JSON, the other is EConf:
{"os": [{"name": "eplOS","author": "Ttimofeyka#1147"}]}
And
os { name "eplOS" author "Ttimofeyka#1147" }
It is immediately clear that the second one is much simpler, and it would be easier to write it than the first option. EConf to set the value of the identifier does not need additional characters (only space/tab/line break for digits), this is its main ease. That is, if in JSON you can do so:
{"os": ["eplOS","Ttimofeyka#1147"]}
Then everything will be somewhat simpler in EConf:
os ["eplOS" "Ttimofeyka#1147"]
Also, in EConf, you can write this as:
os["eplOS""Ttimofeyka#1147"]
There are only 9 types in EConf: string, integer, floating point number, hexadecimal number, array (for types before that) and object. Here is an example of their recording:
str "String"
int 0
float 0.56
hex 0x50
arr["10" "10"]
obj{a "b" c "d"}
Also, there are single-line comments in EConf that start with #:
#String
str"str"
- Registered by Timofey Gorbylev
- 1.0.1 released 2 years ago
- Makcimka132/EConf
- proprietary
- Copyright © 2022, Ttimofeyka
- Authors:
- Dependencies:
- none
- Versions:
-
1.0.77 2022-Jan-12 1.0.76 2022-Jan-10 1.0.75 2022-Jan-09 1.0.74 2022-Jan-09 1.0.73 2022-Jan-09 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
48 downloads total
-
- Score:
- 0.0
- Short URL:
- econf.dub.pm