Simplify Threads captions and capture five minutes after sunrise
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user