Nim script for working with YAML metadata.
This commit is contained in:
parent
1c632dd1d0
commit
a51c9e7f2f
19
src/yamlImporter.nim
Normal file
19
src/yamlImporter.nim
Normal file
@ -0,0 +1,19 @@
|
||||
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
|
Loading…
Reference in New Issue
Block a user