From a51c9e7f2f405a476be2809e5d759693dabdfd07 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Sun, 16 Oct 2022 18:20:57 -0500 Subject: [PATCH] Nim script for working with YAML metadata. --- src/yamlImporter.nim | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/yamlImporter.nim diff --git a/src/yamlImporter.nim b/src/yamlImporter.nim new file mode 100644 index 0000000..1c40c47 --- /dev/null +++ b/src/yamlImporter.nim @@ -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=|--help] " & + "..." + errormsg "You made a mistake!" + +# import values + +#if testing: +# echo("Testing enabled") + +let metadata = $yaml.loadToJson(yamlString) +echo metadata \ No newline at end of file