in shelldocs/src/main/python/shelldocs.py [0:0]
def write_output(self):
""" write the markdown file """
self.filepath.parent.mkdir(parents=True, exist_ok=True)
with open(self.filename, "w", encoding='utf-8') as outfile:
outfile.write(ASFLICENSE)
self.write_tableofcontents(outfile)
outfile.write("\n------\n\n")
header = []
for function in self.functions:
if header != function.header():
header = function.header()
outfile.write(f"## {header}\n")
outfile.write(function.getdocpage())