forked from thomasokken/free42
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-history
executable file
·40 lines (35 loc) · 1.22 KB
/
build-history
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/python3
import sys
import os
hist = open("HISTORY").read()
hist = hist.replace("&", "&")
hist = hist.replace("<", "<")
hist = hist.replace(">", ">")
title = "Free42 History"
try:
os.mkdir("packages", 0o755)
except:
pass
html = open("packages/history.html", "w")
html.write("<html>\n"
+ "<head>\n"
+ " <title>" + title + "</title>\n"
+ " <link rel=\"icon\" type=\"image/png\" href=\"images/free42-icon.png\">\n"
+ " <link rel=\"stylesheet\" href=\"../styles/default.css\">\n"
+ " <style>\n"
+ " .crumb { color: DeepPink }\n"
+ " .crumb:link { text-decoration: none; }\n"
+ " .crumb:visited {text-decoration: none; }\n"
+ " .crumb:active { text-decoration: none; }\n"
+ " .crumb:hover { text-decoration: underline; }\n"
+ " </style>\n"
+ "</head>\n"
+ "<body>\n"
+ "<h1>" + title + "</h1>\n"
+ "<pre><a href=\"..\" class=\"crumb\">Home</a> > <a href=\".\" class=\"crumb\">Free42</a> > History</pre>\n"
+ "<pre>" + hist + "</pre>\n"
+ "<p>\n"
+ "<a href=\".\">Go to Free42 home page</a>\n"
+ "</body>\n"
+ "</html>")
html.close()