19 lines
402 B
Nim
19 lines
402 B
Nim
|
import yaml
|
||
|
import json
|
||
|
import commandeer
|
||
|
|
||
|
commandline:
|
||
|
argument yamlString, string
|
||
|
# option testing, bool, "testing", "t"
|
||
|
exitoption "help", "h",
|
||
|
"Usage: yamlImporter [--testing|--int=<int>|--help] " &
|
||
|
"<yamlString>..."
|
||
|
errormsg "You made a mistake!"
|
||
|
|
||
|
# import values
|
||
|
|
||
|
#if testing:
|
||
|
# echo("Testing enabled")
|
||
|
|
||
|
let metadata = $yaml.loadToJson(yamlString)
|
||
|
echo metadata
|