Skip to content

aarikpokras/ebsl

Repository files navigation

Stage

CI Status Code size

Equals-based Serialization Language

Contents

What's next?
  • Config file
  • Installation script

Compilation

Prep

Meson

Run:

pip install meson ninja

or

pip3 install meson ninja

This should work on most systems.

Building

Meson

To write the ninja files, run:

meson build

Then

cd build && ninja

The executable should be in that directory.

CMake

To write the makefiles, run:

cmake -Bbuild

Then

cd build && make

The executable should be in that directory.

Command usage

Arg Purpose Type
file File to read from string
key The key whose values to get string
amt The amount of values to print for the key integer or max

File conf.ebsl:

hello=world
github=git,website
phone=samsung,apple,xiaomi

To get the value of hello, run:

./ebsl file=conf.ebsl key=hello amt=1

To get the values of github, run the above command, replacing the key and amount appropriately:

./ebsl file=conf.ebsl key=github amt=2

Finally, to get all values for a key (e.g. phone), run the following:

./ebsl file=conf.ebsl key=phone amt=max

Syntax

To set a value, use:

key=value

You can also set multiple values for one key, but you need to specify the amount of values you'd like to read:

key=value1,value2