Skip to content
Snippets Groups Projects
Commit 59f730fe authored by Jutta Schnabel's avatar Jutta Schnabel
Browse files

clean up document maker

parent 06f80707
No related branches found
No related tags found
No related merge requests found
Pipeline #14438 passed
#!/usr/bin/python #!/usr/bin/python
def fulltext_from_filelist(filelistname, onlystatus = ""): def fulltext_from_filelist(filelistname, onlystatus = ""):
fulltext = "Summary for "+filenamelist+"\n\n" fulltext = "Summary for "+filelistname+"\n\n"
fulltext += "[[_TOC_]]" fulltext += "[[_TOC_]]"
overview = {"filename": [], "author": [], "status": []} overview = {"filename": [], "author": [], "status": []}
with open(filelistname, "r") as f: with open(filelistname, "r") as f:
...@@ -13,9 +13,9 @@ def fulltext_from_filelist(filelistname, onlystatus = ""): ...@@ -13,9 +13,9 @@ def fulltext_from_filelist(filelistname, onlystatus = ""):
status, author = "", "" status, author = "", ""
for line in infotext: for line in infotext:
if line.find("status:")> -1: if line.find("status:")> -1:
status = line[9:len(line)] status = line[8:len(line)]
if line.find("Author")> -1: if line.find("Author")> -1:
author = line[9:len(line)] author = line[8:len(line)]
takeit = True takeit = True
if onlystatus: if onlystatus:
takeit = False takeit = False
...@@ -45,11 +45,11 @@ with open("statuspage.md", "w") as f: ...@@ -45,11 +45,11 @@ with open("statuspage.md", "w") as f:
status = "## Current page status\n\n" status = "## Current page status\n\n"
status += "| Filename | Author | Status |\n" status += "| Filename | Author | Status |\n"
status += "| -------- | ------ | ------ |\n" status += "| -------- | ------ | ------ |\n"
for stats in (status1, status2) for stats in (status1, status2):
for i in range(len(stats["filename"])): for i in range(len(stats["filename"])):
status += "| " + stats["filename"] \ status += "| " + stats["filename"][i] \
+ " | " + stats["author"] \ + " | " + stats["author"][i] \
+ " | " + stats["status"] + " |\n" + " | " + stats["status"][i] + " |\n"
f.write(status) f.write(status)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment