summaryrefslogtreecommitdiffstats
path: root/MCServer
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-06-04 12:23:38 +0200
committerMattes D <github@xoft.cz>2015-06-04 12:23:38 +0200
commitf645673bae0f18dc1ad9cb4a99a41cbd05a34a66 (patch)
treeb0ad3a69d704b83732119ccfddbdd08d3a29ff84 /MCServer
parentMerge pull request #2202 from mc-server/CmakeCleanup (diff)
downloadcuberite-f645673bae0f18dc1ad9cb4a99a41cbd05a34a66.tar
cuberite-f645673bae0f18dc1ad9cb4a99a41cbd05a34a66.tar.gz
cuberite-f645673bae0f18dc1ad9cb4a99a41cbd05a34a66.tar.bz2
cuberite-f645673bae0f18dc1ad9cb4a99a41cbd05a34a66.tar.lz
cuberite-f645673bae0f18dc1ad9cb4a99a41cbd05a34a66.tar.xz
cuberite-f645673bae0f18dc1ad9cb4a99a41cbd05a34a66.tar.zst
cuberite-f645673bae0f18dc1ad9cb4a99a41cbd05a34a66.zip
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/APIDump/main.css2
-rw-r--r--MCServer/Plugins/APIDump/main_APIDump.lua29
2 files changed, 22 insertions, 9 deletions
diff --git a/MCServer/Plugins/APIDump/main.css b/MCServer/Plugins/APIDump/main.css
index 8041e0d01..e5685caab 100644
--- a/MCServer/Plugins/APIDump/main.css
+++ b/MCServer/Plugins/APIDump/main.css
@@ -61,7 +61,7 @@ footer
font-family: Segoe UI Light, Helvetica;
}
-#content
+#content, #timestamp
{
padding: 0px 25px 25px 25px;
}
diff --git a/MCServer/Plugins/APIDump/main_APIDump.lua b/MCServer/Plugins/APIDump/main_APIDump.lua
index e841922b6..f1966d013 100644
--- a/MCServer/Plugins/APIDump/main_APIDump.lua
+++ b/MCServer/Plugins/APIDump/main_APIDump.lua
@@ -153,6 +153,16 @@ end
+--- Returns the timestamp in HTML format
+-- The timestamp will be inserted to all generated HTML files
+local function GetHtmlTimestamp()
+ return string.format("<div id='timestamp'>Generated on %s</div>", os.date("%Y-%m-%d %H:%M:%S"))
+end
+
+
+
+
+
local function WriteArticles(f)
f:write([[
<a name="articles"><h2>Articles</h2></a>
@@ -296,7 +306,9 @@ local function WriteHtmlHook(a_Hook, a_HookNav)
f:write("<p>", (example.Desc or "<i>missing Desc</i>"), "</p>\n");
f:write("<pre class=\"prettyprint lang-lua\">", (example.Code or "<i>missing Code</i>"), "\n</pre>\n\n");
end
- f:write([[</td></tr></table></div><script>prettyPrint();</script></body></html>]]);
+ f:write([[</td></tr></table></div><script>prettyPrint();</script>]])
+ f:write(GetHtmlTimestamp())
+ f:write([[</body></html>]])
f:close();
end
@@ -941,8 +953,10 @@ local function WriteHtmlClass(a_ClassAPI, a_ClassMenu)
end
end
- cf:write([[</td></tr></table></div><script>prettyPrint();</script></body></html>]]);
- cf:close();
+ cf:write([[</td></tr></table></div><script>prettyPrint();</script>]])
+ cf:write(GetHtmlTimestamp())
+ cf:write([[</body></html>]])
+ cf:close()
end
@@ -1320,11 +1334,10 @@ local function DumpAPIHtml(a_API)
WriteStats(f);
- f:write([[ </ul>
- </div>
- </body>
-</html>]]);
- f:close();
+ f:write([[</ul></div>]])
+ f:write(GetHtmlTimestamp())
+ f:write([[</body></html>]])
+ f:close()
LOG("API subfolder written");
end