Skip to content
Snippets Groups Projects
Commit 298805ed authored by Eric S. Raymond's avatar Eric S. Raymond
Browse files

ntpviz: Add the ability to embed a notes file in the HTML.

parent e03f9659
No related branches found
No related tags found
Loading
......@@ -427,6 +427,15 @@ ntpviz</a>, part of the <a href="https://www.ntpsec.org/">NTPsec project</a>
ifile.write(index_header)
for (imagename, _) in imagepairs:
ifile.write("<img src='%s.png' alt='%s plot'>\n" % (imagename, imagename.replace('-', ' ')))
# if notes file, add it to index.html
notes = os.path.join(outdir, "notes")
if os.path.isdir(outdir):
try:
notes_file = open( notes, 'r')
notes_txt = notes_file.read()
ifile.write('<br>Notes:\n' + notes_txt + '\n')
except IOError:
pass
ifile.write(index_trailer)
# end
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