From 5c1bd1cb149fd31ad91d7dcf8d7f18934ab8c197 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Wed, 5 Jan 2022 16:22:44 -0600 Subject: [PATCH] Add regular input/output parsing to parameter parsing function Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com> --- nfdocs-parser.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/nfdocs-parser.py b/nfdocs-parser.py index ec5ac82..e87bcbb 100755 --- a/nfdocs-parser.py +++ b/nfdocs-parser.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import sys import yaml +from docutils import nodes # Declare the docstring starting characters DOC_STARTER = "/// " @@ -37,8 +38,13 @@ def params_to_list(params): tuple_item += tuple_list return tuple_item else: - return nodes.list_item(text="not tuple") - print("not yet implemented") + print(params) + io_item = nodes.list_item() + if "name" in params.keys(): + io_item += nodes.paragraph(text=params["name"]) + io_item += nodes.paragraph(text=f"Type: {params['type']}") + io_item += nodes.paragraph(text=params["description"]) + return io_item # Take path as single argument for now nextflow_path = sys.argv[1]