blob: d465f0d993df9b95caae28aeca76809cb7ec542f (
plain) (
blame)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
#!/usr/bin/python
##
## license:BSD-3-Clause
## copyright-holders:Vas Crabb
import string
ERROR_PAGE = string.Template(
'<!DOCTYPE html>\n' \
'<html>\n' \
'<head>\n' \
' <meta http-equiv="Content-Type" content="text/html; charset=utf-8">\n' \
' <title>${code} ${message}</title>\n' \
'</head>\n' \
'<body>\n' \
'<h1>${message}</h1>\n' \
'</body>\n' \
'</html>\n')
MACHINE_PROLOGUE = string.Template(
'<!DOCTYPE html>\n' \
'<html>\n' \
'<head>\n' \
' <meta http-equiv="Content-Type" content="text/html; charset=utf-8">\n' \
' <meta http-equiv="Content-Style-Type" content="text/css">\n' \
' <meta http-equiv="Content-Script-Type" content="text/javascript">\n' \
' <link rel="stylesheet" type="text/css" href="${assets}/style.css">\n' \
' <script type="text/javascript">\n' \
' var appurl="${app}"\n' \
' var assetsurl="${assets}"\n' \
' </script>\n' \
' <script type="text/javascript" src="${assets}/common.js"></script>\n' \
' <script type="text/javascript" src="${assets}/machine.js"></script>\n' \
' <title>Machine: ${description} (${shortname})</title>\n' \
'</head>\n' \
'<body>\n' \
'<h1>${description}</h1>\n' \
'<table class="sysinfo">\n' \
' <tr><th>Short name:</th><td>${shortname}</td></tr>\n' \
' <tr><th>Is device:</th><td>${isdevice}</td></tr>\n' \
' <tr><th>Runnable:</th><td>${runnable}</td></tr>\n' \
' <tr><th>Source file:</th><td><a href="${sourcehref}">${sourcefile}</a></td></tr>\n')
MACHINE_SLOTS_PLACEHOLDER = string.Template(
'<h2>Options</h2>\n' \
'<p id="para-cmd-preview"></p>\n' \
'<h3>Slots</h3>\n' \
'<p id="para-slots-placeholder">Loading slot information…<p>\n' \
'<script>fetch_slots("${machine}");</script>\n')
MACHINE_ROW = string.Template(
' <tr>\n' \
' <td><a href="${machinehref}">${shortname}</a></td>\n' \
' <td><a href="${machinehref}">${description}</a></td>\n' \
' <td><a href="${sourcehref}">${sourcefile}</a></td>\n' \
' </tr>\n')
EXCL_MACHINE_ROW = string.Template(
' <tr>\n' \
' <td><a href="${machinehref}">${shortname}</a></td>\n' \
' <td></td>\n' \
' <td></td>\n' \
' </tr>\n')
SOURCEFILE_PROLOGUE = string.Template(
'<!DOCTYPE html>\n' \
'<html>\n' \
'<head>\n' \
' <meta http-equiv="Content-Type" content="text/html; charset=utf-8">\n' \
' <meta http-equiv="Content-Style-Type" content="text/css">\n' \
' <meta http-equiv="Content-Script-Type" content="text/javascript">\n' \
' <link rel="stylesheet" type="text/css" href="${assets}/style.css">\n' \
' <script type="text/javascript">var assetsurl="${assets}"</script>\n' \
' <script type="text/javascript" src="${assets}/common.js"></script>\n' \
' <title>Source File: ${filename}</title>\n' \
'</head>\n' \
'<body>\n' \
'<h1>${title}</h1>\n')
SOURCEFILE_ROW_PARENT = string.Template(
' <tr>\n' \
' <td><a href="${machinehref}">${shortname}</a></td>\n' \
' <td><a href="${machinehref}">${description}</a></td>\n' \
' <td>${year}</td>\n' \
' <td>${manufacturer}</td>\n' \
' <td>${runnable}</td>\n' \
' <td></td>\n' \
' </tr>\n')
SOURCEFILE_ROW_CLONE = string.Template(
' <tr>\n' \
' <td><a href="${machinehref}">${shortname}</a></td>\n' \
' <td><a href="${machinehref}">${description}</a></td>\n' \
' <td>${year}</td>\n' \
' <td>${manufacturer}</td>\n' \
' <td>${runnable}</td>\n' \
' <td><a href="${parenthref}">${parent}</a></td>\n' \
' </tr>\n')
SOURCEFILE_LIST_PROLOGUE = string.Template(
'<!DOCTYPE html>\n' \
'<html>\n' \
'<head>\n' \
' <meta http-equiv="Content-Type" content="text/html; charset=utf-8">\n' \
' <meta http-equiv="Content-Style-Type" content="text/css">\n' \
' <meta http-equiv="Content-Script-Type" content="text/javascript">\n' \
' <link rel="stylesheet" type="text/css" href="${assets}/style.css">\n' \
' <script type="text/javascript">var assetsurl="${assets}"</script>\n' \
' <script type="text/javascript" src="${assets}/common.js"></script>\n' \
' <title>${title}</title>\n' \
'</head>\n' \
'<body>\n' \
'<h1>${heading}</h1>\n' \
'<table id="tbl-sourcefiles">\n' \
' <thead>\n' \
' <tr>\n' \
' <th>Source file</th>\n' \
' <th class="numeric">Machines</th>\n' \
' </tr>\n' \
' </thead>\n' \
' <tbody>\n')
SOURCEFILE_LIST_ROW = string.Template(
' <tr>\n' \
' <td>${sourcefile}</td>\n' \
' <td style="text-align: right">${machines}</td>\n' \
' </tr>\n')
|