You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
2 months ago | |
---|---|---|
src | 2 months ago | |
.gitignore | 2 months ago | |
COPYING | 7 months ago | |
Cargo.lock | 2 months ago | |
Cargo.toml | 2 months ago | |
README.md | 9 months ago |
README.md
tomcat
– a minimal TOML parser for the command line.
Installation
From Source
- Run
cargo --install --git https://git.tebibyte.media/emma/tomcat.git
- ???
- Profit
Also make sure that your cargo bin
directory (by default in
"$CARGO_HOME"/bin
) is in your $PATH
; I recommend symlinking the folder to
"$HOME/.local/bin
and adding that to your user $PATH
.
Usage
Assuming the TOML file being parsed is file.toml
:
To get the value of top-level key notable
:
tomcat notable file.toml
To get the value of key
from the main
table:
tomcat main.key file.toml
To get the value of key
from the subtable subtab
in table main
:
tomcat main.subtab.key file.toml
To get the value of index 3
in array arr
in table main
:
tomcat main.arr[3] file.toml