From 1a34c652ad2b1cd5b37c530fe47c844c8a9d34e3 Mon Sep 17 00:00:00 2001 From: mika Date: Thu, 17 Sep 2026 13:10:47 +0200 Subject: [PATCH] final preps for atom --- Makefile | 4 ++-- blog/data.tsv | 4 ++-- include/stdhead.html | 7 +++++++ kethel2/aggregate.c | 12 +++++++++++- static/5f7b6ed8dce89bcce3c1afde8a9d3566.jpeg | Bin 154838 -> 0 bytes thoughts/data.tsv | 4 ++-- thoughts/item.html | 2 +- 7 files changed, 25 insertions(+), 8 deletions(-) delete mode 100644 static/5f7b6ed8dce89bcce3c1afde8a9d3566.jpeg diff --git a/Makefile b/Makefile index 0dae2950558f7fca3b98aaf0a46da0ea31f9be9c..0113b20c0c5927aef3027a6816df334204f9967a 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/blog/data.tsv b/blog/data.tsv index 03054bad71641cd42d6fab5b1d868655378d8e30..0e631162c6a38fa370a37785ad8645669010d6c8 100644 --- a/blog/data.tsv +++ b/blog/data.tsv @@ -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 diff --git a/include/stdhead.html b/include/stdhead.html index 5c74227d4f5bed7daab83f7fd8870acfcec8d3f4..eb2bf5b98ad44a79b4303324dc56fc4ae875f03b 100644 --- a/include/stdhead.html +++ b/include/stdhead.html @@ -7,4 +7,11 @@ figcaption { font-style: italic; margin-left: 1em; } +a { + font-style: italic; +} +a:visited { + font-style: initial; + color: #0000ee; +} diff --git a/kethel2/aggregate.c b/kethel2/aggregate.c index 35afae73ca049f13ca6ff46967f3ae28b42bbfa4..b8ca2dec8d83838924c46c1f2a5c4f767ccc6b1a 100644 --- a/kethel2/aggregate.c +++ b/kethel2/aggregate.c @@ -1,6 +1,7 @@ #include #include #include +#include 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(" , at - +