Crates.io | rtoml-cli |
lib.rs | rtoml-cli |
version | 0.1.0 |
source | src |
created_at | 2023-08-22 18:22:43.917065 |
updated_at | 2023-08-22 18:22:43.917065 |
description | toml file parser written in Rust |
homepage | https://github.com/saizo80/rtoml |
repository | https://github.com/saizo80/rtoml |
max_upload_size | |
id | 951238 |
size | 16,228 |
command line toml file parser written in rust
can be called on the command line after installation with rtoml
the first positional argument should be a file and the second should be the key in dot notation
if the toml file has the following content:
value1 = "foo"
array_value = [
"1",
"2",
"3",
]
[table]
value2 = "bar"
["table with spaces"]
"value with spaces" = "space"
the following can be accessed by the following commands
rtoml <filename> value1
rtoml <filename> table.value2
for arrays each value will be printed on a separate newline, therefore the command
rtoml <filename> array_value
will produce the output
1
2
3
spaces in table and value names are also supported as long as the entire passed value is quoted like so
rtoml <filename> "table with spaces.value with spaces"
cargo install rtoml-cli
precompiled binaries are also available on github if rust is not installed on the computer