about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-04-23 15:41:44 -0400
committerJune McEnroe <june@causal.agency>2020-04-23 15:41:44 -0400
commitf8a3724f7c627ec604bfdc4c0651478be34ae2b8 (patch)
treee4f0a22141b743ea12265bfbb6d083a0f987e420
parentAdd basic patch highlighting (diff)
downloadbubger-f8a3724f7c627ec604bfdc4c0651478be34ae2b8.tar.gz
bubger-f8a3724f7c627ec604bfdc4c0651478be34ae2b8.zip
Add generate time footer
-rw-r--r--html.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/html.c b/html.c
index b883414..b138e73 100644
--- a/html.c
+++ b/html.c
@@ -395,5 +395,18 @@ int htmlSubthreadClose(FILE *file) {
 }
 
 int htmlThreadClose(FILE *file) {
-	return templateRender(file, TEMPLATE(</main>), NULL, NULL);
+	const char *template = TEMPLATE(
+		</main>
+		<footer>
+			generated <time datetime="[time]">[time]</time>
+		</footer>
+	);
+	time_t now = time(NULL);
+	char time[sizeof("0000-00-00T00:00:00Z")];
+	strftime(time, sizeof(time), "%FT%TZ", gmtime(&now));
+	struct Variable vars[] = {
+		{ "time", time },
+		{0},
+	};
+	return templateRender(file, template, vars, escapeXML);
 }
ect'>Publish "Care"June McEnroe 2022-03-31Publish "Compassion"June McEnroe 2022-03-24Skip matches with ident chars on either sideJune McEnroe This fixes, for example, where the link gets placed on static regex_t regex(const char *pattern, int flags) in title.c. 2022-03-24Add The Invisible Life of Addie LaRueJune McEnroe So good, but so long. Reminded me of The Ten Thousand Doors of January at the beginning, and more of that N. K. Jemisin series about gods later. I like this interacting with gods and becoming something like one sort of thing. God, it took me a whole month (more?) to read and this is only my third book of the year :( I need some more novellas to read, but the other books I have from the library currently are also thick. 2022-03-22Source ~/.profile.local if it existsJune McEnroe 2022-03-18Publish "Addendum 2021"June McEnroe 2022-03-16Remove wcwidth portJune McEnroe DYLD_FORCE_FLAT_NAMESPACE no longer exists in macOS 12 so this approach doesn't work anymore. Moved to <https://git.causal.agency/jorts/tree/wcwidth> and compiled into <https://git.causal.agency/jorts/tree/ncurses>. 2022-03-16Remove -j4 from ./PlanJune McEnroe Plan learned to set this automatically! 2022-03-15Rewrite Linux install.sh for DebianJune McEnroe 2022-03-15Remove dashJune McEnroe