M Makefile => Makefile +2 -2
@@ 24,8 24,8 @@ aggregate: kethel2/aggregate.c
$(CC) $(CFLAGS) tmp/aggregate.o -o aggregate
# TODO: manage statics in a better way than `cp -r`
-static:
- cp -r static out/static
+#static:
+# cp -r static out/static
# list of all pages
pages: out/index.html out/colophon.html out/thoughts.html out/blog/index.html out/blog/helloworld.html static
M blog/data.tsv => blog/data.tsv +2 -2
@@ 1,2 1,2 @@
-rowid LINK TITLE SUMMARY TIME DATE
-0 /blog/helloworld.html Hello, world! Testing blog post :3 15/09/2026 2026-09-15T16:39:46+0200
+rowid bdate LINK TITLE SUMMARY
+0 2026-09-15T16:39:46+0200 /blog/helloworld.html Hello, world! Testing blog post :3
M include/stdhead.html => include/stdhead.html +7 -0
@@ 7,4 7,11 @@ figcaption {
font-style: italic;
margin-left: 1em;
}
+a {
+ font-style: italic;
+}
+a:visited {
+ font-style: initial;
+ color: #0000ee;
+}
</style>
M kethel2/aggregate.c => kethel2/aggregate.c +11 -1
@@ 1,6 1,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <time.h>
char* read_to_string(const char* path) {
FILE* f = fopen(path, "rb");
@@ 31,6 32,7 @@ int strfind(const char* haystack, char needle) {
}
void write_item_data(char* restrict row, const char* restrict template, FILE* out) {
+ char prettyDate[64];
char* tok = strtok(row, "\t");
const char* pref = "item-";
char* label = malloc(strlen(pref) + strlen(tok) + 2);
@@ 38,6 40,12 @@ void write_item_data(char* restrict row, const char* restrict template, FILE* ou
char* data[8];
data[0] = label;
int i = 1;
+ char* date = strtok(NULL, "\t");
+ struct tm bdate;
+ strptime(date, "%Y-%m-%dT%H:%M:%S%z", &bdate);
+ strftime(prettyDate, 64, "%H:%M", &bdate);
+ //fprintf(stderr, "%s\n", prettyDate);
+
tok = strtok(NULL, "\t");
while (tok != NULL) {
data[i] = malloc(strlen(tok) + 1);
@@ 78,7 86,9 @@ void write_item_data(char* restrict row, const char* restrict template, FILE* ou
int offset = strlen("<!-- LINK ");
unsigned char idx = templateLine[offset] - 0x30;
fprintf(out, "<a href=\"%s\">", data[idx]);
- } else {
+ } else if (strncmp(templateLine, "<!-- DATE", strlen("<!-- DATE") - 1) == 0){
+ fputs(prettyDate, out);
+ } else {
fputs(templateLine, out);
}
nextLine += needlePos;
D static/5f7b6ed8dce89bcce3c1afde8a9d3566.jpeg => static/5f7b6ed8dce89bcce3c1afde8a9d3566.jpeg +0 -0
M thoughts/data.tsv => thoughts/data.tsv +2 -2
@@ 1,2 1,2 @@
-rowid BODY AUTHOR DATE
-0 we always call it the 'fridge',, Howevere, why do we not call outside the 'warmdge' ? mika 2026-09-15T16:31:15+02:00
+rowid bdate BODY AUTHOR
+0 2026-09-15T16:31:15+02:00 we always call it the 'fridge',, Howevere, why do we not call outside the 'warmdge' ? mika
M thoughts/item.html => thoughts/item.html +1 -1
@@ 5,7 5,7 @@
<figcaption>
<!-- PUT 2 -->
, at
-<!-- PUT 3 -->
+<!-- DATE -->
</figcaption>
</figure>
<hr>