[Git][NTPsec/ntpsec][master] 2 commits: Add a favicon.ico if none found. call it from index.html.

Gary E. Miller gitlab at mg.gitlab.com
Sat Sep 10 01:59:29 UTC 2016


Gary E. Miller pushed to branch master at NTPsec / ntpsec


Commits:
70ac42ba by Gary E. Miller at 2016-09-09T18:59:03-07:00
Add a favicon.ico if none found.  call it from index.html.

- - - - -
b2e9677d by Gary E. Miller at 2016-09-09T18:59:03-07:00
Format the ntpsec_log base64 nicely.

- - - - -


1 changed file:

- ntpstats/ntpviz


Changes:

=====================================
ntpstats/ntpviz
=====================================
--- a/ntpstats/ntpviz
+++ b/ntpstats/ntpviz
@@ -544,8 +544,64 @@ plot \\
     plot = plot[:-2]
     return plot
 
+# here is how to create the base64 from an image file:
+# with open("path/to/file.png", "rb") as f:
+#    data = f.read()
+#    print data.encode("base64")
+#
 ntpsec_logo = """
-iVBORw0KGgoAAAANSUhEUgAAAEAAAABKCAQAAACh+5ozAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAJiS0dEAP7wiPwpAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFKElEQVRo3s2ZT0wcVRzHPzMLKCwsNgqLkYPSxBjbRF3TcKlC4VAhFU0AdRN7a+zBEsUEL0qImqoxMTWhBzEkTdqmREhMCgpeiiV6KVE46MVE1KQguxv/df81tLvzPOzsMjs7sztvd7b4ndPsfPf3vu/33vv93vs9yGCIJMLyWaKJXTSxZMMTCITilJ1kKENRdeoB6rHGYboNb80cpAjEQZoNr90ctiHWcyBfgD0aCZTk2CFAYylKTd7bVZYNknycwGf5ryjTRE2/OWVr9Bh9ahbwnuGtnRdsTZ5h0/Rbhr1PDYhNUZyt2guwRjdazi8+G0lZeMWoeExna3mzxwbOBDgwlIWQYhefhCkSNl8SpCpkO/JAiHFO00D+kCokGa8JpRyylSTjIlSeAPiC7/AU/JomknLM9qRbIjv8XaaANNs4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@@ -724,6 +780,12 @@ if __name__ == '__main__':
                  % outdir)
             raise SystemExit(1)
 
+    # if no ntpsec favicon.ico, write one.
+    ico_filename = os.path.join(outdir, "favicon.ico")
+    if not os.path.isfile( ico_filename ):
+        with open( ico_filename, "w" ) as wp:
+            wp.write(binascii.a2b_base64(ntpsec_ico))
+
     # if no ntpsec logo, write one.
     logo_filename = os.path.join(outdir, "ntpsec-logo.png")
     if not os.path.isfile( logo_filename ):
@@ -829,6 +891,7 @@ at 0s. Typical 90% ranges may be: local serial GPS 200 ms; local LAN peer
 <!DOCTYPE html>
 <html lang="en">
 <head>
+<link rel="shortcut icon" href="favicon.ico">
 <meta charset="UTF-8">
 <meta http-equiv="refresh" content="1800">
 <meta name="expires" content="0">



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/0f62c3e3bcce9da0c87631190d9188c8d9779254...b2e9677d958b9489e2f21fdc0792184efa7edcbe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160910/6213c36d/attachment.html>


More information about the vc mailing list