From 59f730fe667733bec901123b3698f699203d6076 Mon Sep 17 00:00:00 2001 From: jschnabel <jschnabel@km3net.de> Date: Fri, 9 Oct 2020 23:23:05 +0200 Subject: [PATCH] clean up document maker --- make_documents.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/make_documents.py b/make_documents.py index 4fa04ab..dc0e414 100644 --- a/make_documents.py +++ b/make_documents.py @@ -1,7 +1,7 @@ #!/usr/bin/python def fulltext_from_filelist(filelistname, onlystatus = ""): - fulltext = "Summary for "+filenamelist+"\n\n" + fulltext = "Summary for "+filelistname+"\n\n" fulltext += "[[_TOC_]]" overview = {"filename": [], "author": [], "status": []} with open(filelistname, "r") as f: @@ -13,9 +13,9 @@ def fulltext_from_filelist(filelistname, onlystatus = ""): status, author = "", "" for line in infotext: if line.find("status:")> -1: - status = line[9:len(line)] + status = line[8:len(line)] if line.find("Author")> -1: - author = line[9:len(line)] + author = line[8:len(line)] takeit = True if onlystatus: takeit = False @@ -45,11 +45,11 @@ with open("statuspage.md", "w") as f: status = "## Current page status\n\n" status += "| Filename | Author | Status |\n" status += "| -------- | ------ | ------ |\n" - for stats in (status1, status2) - for i in range(len(stats["filename"])): - status += "| " + stats["filename"] \ - + " | " + stats["author"] \ - + " | " + stats["status"] + " |\n" + for stats in (status1, status2): + for i in range(len(stats["filename"])): + status += "| " + stats["filename"][i] \ + + " | " + stats["author"][i] \ + + " | " + stats["status"][i] + " |\n" f.write(status) -- GitLab