summaryrefslogtreecommitdiff
path: root/lib/cli.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cli.py')
-rw-r--r--lib/cli.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/cli.py b/lib/cli.py
index 1ee1f33..3e7865b 100644
--- a/lib/cli.py
+++ b/lib/cli.py
@@ -143,6 +143,18 @@ def model_quality_table(header, result_lists, info_list):
print(buf)
+def export_dataref(dref_file, dref):
+ with open(dref_file, "w") as f:
+ for k, v in sorted(dref.items()):
+ if type(v) is not tuple:
+ v = (v, None)
+ if v[1] is None:
+ prefix = r"\drefset{"
+ else:
+ prefix = r"\drefset" + f"[unit={v[1]}]" + "{"
+ print(f"{prefix}/{k}" + "}{" + str(v[0]) + "}", file=f)
+
+
def add_standard_arguments(parser):
parser.add_argument(
"--export-dref",