slw2gmi

Конвертор из slweb-а у Џемини
Дневник | Датотеке | Референце | ПРОЧИТАЈМЕ | ЛИЦЕНЦА

чување 9e5512e0a1411aeaf869740041a1a30825e64c98
родитељ aca5b2b4fca42e7b08ed706f251c3a4a22336b6d
Аутор: Страхиња Радић <contact@strahinja.org>
Датум:   Fri,  7 May 2021 14:09:39 +0200

Changed timestamp format to conform to Gemini blog index specifications

Signed-off-by: Страхиња Радић <contact@strahinja.org>

Diffstat:
Mdefs.h | 2+-
Mslw2gmi.c | 4++--
измењених датотека: 2, додавања: 3(+), брисања: 3(-)

diff --git a/defs.h b/defs.h @@ -48,7 +48,7 @@ #define SMALL_ARGSIZE 256 #define DATEBUFSIZE 12 -static const char timestamp_format[] = "d.m.y"; +static const char timestamp_format[] = "y-m-d"; static const char timestamp_output_ext[] = ".html"; static const char CMD_GIT_LOG[] = "xargs"; diff --git a/slw2gmi.c b/slw2gmi.c @@ -1319,12 +1319,12 @@ process_timestamp(FILE* output, const uint8_t* link_prefix, const char* link, ptimestamp_format++; } if (title) - print_output(output, "=> %s%s%s.gmi\t%s [%s]\n", + print_output(output, "=> %s%s%s.gmi\t%s %s\n", url_is_local(link) && global_link_prefix ? (const char*)global_link_prefix : "", url_is_local(link) && link_prefix ? (const char*)link_prefix : "", - link, title, formatted_date); + link, formatted_date, title); else print_output(output, "=> %s%s%s.gmi\t%s\n", url_is_local(link) && global_link_prefix