[Git][NTPsec/ntpsec][master] Deleted 1 commit: ntpviz: Add the ability to embed a notes file in the HTML.

Eric S. Raymond gitlab at mg.gitlab.com
Wed Aug 17 21:41:22 UTC 2016


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


WARNING: The push did not contain any new commits, but force pushed to delete the commits and changes below.


Deleted commits:
298805ed by Eric S. Raymond at 2016-08-17T17:40:59-04:00
ntpviz: Add the ability to embed a notes file in the HTML.

- - - - -


1 changed file:

- ntpstats/ntpviz


Changes:

=====================================
ntpstats/ntpviz
=====================================
--- a/ntpstats/ntpviz
+++ b/ntpstats/ntpviz
@@ -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



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/298805ed20a586eb6436ed1e9ebcfe1e5a2ca224
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160817/dc3196e2/attachment.html>


More information about the vc mailing list