Simplify Threads captions and capture five minutes after sunrise

This commit is contained in:
2026-11-02 04:14:11 +09:00
parent 6ce32d33fe
commit 39374cea05
8 changed files with 37 additions and 22 deletions
+1
View File
@@ -50,6 +50,7 @@ export function renderCaption(config: Captions, capture: {
const date = new Date(capture.capturedAt);
const values: Record<string, string> = {
message: config.messages[condition].join('\n'), date: kstFields(date).date,
dateDots: kstFields(date).date.replaceAll('-', '.'), hostname: new URL(capture.url).hostname,
time: kstClock(date).slice(0, 5), sunrise: kstClock(new Date(capture.sunrise)).slice(0, 5), url: capture.url,
};
const text = (capture.test ? config.testPrefix : '') + config.template.join('\n').replace(/\{(\w+)\}/g, (_, key: string) => {