diff --git a/src/caosadvancedtools/read_md_header.py b/src/caosadvancedtools/read_md_header.py index 7ff7d6b94a02084666d8f570d8d9e3fcf6ee4bd3..82d0077f9eae21b59567d2274af8da1e5d3e53ef 100644 --- a/src/caosadvancedtools/read_md_header.py +++ b/src/caosadvancedtools/read_md_header.py @@ -199,7 +199,18 @@ def _add_header(filename): def parse_responsibles(header): + """ + Extract the responsible person(s) from the yaml header. + + If field responsible is a list every entry from that list will be added as a person. + Currently only the format <Firstname> <Lastname> <*> is supported. + If it is a simple string, it is added as the only person. + """ people = [] + if type(header["responsible"]) == list: + resplist = header["responsible"] + else: + resplist = [header["responsible"]] for person in header["responsible"]: firstname = person.split(" ")[0] lastname = person.split(" ")[1]