Skip to content

Commit eb5892b

Browse files
committed
Fix minor
1 parent bc0ede7 commit eb5892b

File tree

14 files changed

+49
-27
lines changed

14 files changed

+49
-27
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
on:
2+
push:
3+
workflow_dispatch:
4+
pull_request:
15
jobs:
26
oxlint:
37
name: Lint

ecosystem.config.cjs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,16 @@ module.exports = {
88
watch: true,
99
// Delay between restart
1010
watch_delay: 1000,
11-
ignore_watch: ['node_modules', 'src', 'sun*', 'ecosystem.config.js', 'README.md'],
11+
ignore_watch: [
12+
'node_modules',
13+
'src',
14+
'stora*',
15+
'sun*',
16+
'time*',
17+
'photo*',
18+
'ecosystem.config.js',
19+
'README.md',
20+
],
1221
watch_options: {
1322
followSymlinks: false,
1423
},

jest.config.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
"scripts": {
88
"start": "tsx --env-file=.env src/main.ts",
99
"command": "tsx --env-file=.env src/commands/index.ts",
10-
"production": "npm run build && npm run run-built",
11-
"run-built": "node --env-file=.env dist/main.js",
12-
"lint": "oxlint",
10+
"production": "npm run build && npm run built",
1311
"build": "tsc -b",
12+
"built": "node --env-file=.env dist/main.js",
13+
"lint": "oxlint",
1414
"clean-build": "tsc -b --clean",
1515
"watch": "tsx watch --env-file=.env src/main.ts",
1616
"test": "vitest",

src/commands/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const logger = di.get(Logger);
88
const args = process.argv.slice(3);
99
const command = process.argv[2];
1010
/*
11+
Full backup & restore
1112
1213
1. Tar/Gzip & Upload
1314

src/context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export function createTelegramMessengerChat(
7979
getMessage: messageFactory.bind(null, bot, chatId),
8080
getChannelMessage: messageFactory.bind(null, bot, copyTargetChatId),
8181
sendMessage: bot.telegram.sendMessage.bind(bot.telegram, chatId),
82-
sendMessageCopy: bot.telegram.copyMessage.bind(bot.telegram, chatId, copyTargetChatId),
82+
sendMessageCopy: bot.telegram.copyMessage.bind(bot.telegram, copyTargetChatId, chatId),
8383
sendPhoto: bot.telegram.sendPhoto.bind(bot.telegram, chatId),
8484
sendAnimation: bot.telegram.sendAnimation.bind(bot.telegram, chatId),
8585
createAnimation: async (

src/i18n.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const base = {
2727
},
2828
de: {
2929
'action.presetSwitch': 'Einstellung wechseln 📷',
30-
'action.shotSingle': 'Einzelschuss 🥃',
30+
'action.shotSingle': 'Schüsschen 🥃',
3131
'action.timelapse': 'Zeitraffer jetzt 🎥',
3232
'action.timelapse-half': 'Halber 🎥',
3333
'action.timelapse-third': 'Drittel 🎥',
@@ -51,7 +51,9 @@ type BasicEntry = keyof BasicIndex;
5151
export type SlottedTranslate = (index: BasicIndex, ...args: BasicEntry[]) => string;
5252

5353
export function dateFormat(d = new Date()) {
54-
return `${d.getDate()}.${d.getMonth() + 1}.${d.getFullYear()} ${d.getHours()}:${d.getMinutes()}`;
54+
const clock = d.toLocaleTimeString().slice(0, 5);
55+
// js dates are the best, I don't regret to have removed dayjs at all!!11
56+
return `${d.getDate()}.${d.getMonth() + 1}.${d.getFullYear()} ${clock}`;
5557
}
5658

5759
const composite = {

src/lib/ffmpeg.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ export async function stitchImages(
5454
//'-filter:v "crop=iw-400:ih-40,scale=1920:1080"',
5555
//'-filter:v "crop=iw-216:ih-888,scale=1920:1080"',
5656
//'-filter:v "crop=iw-216:ih-628,scale=1920:1200"',
57-
//'-vf crop=iw-216:ih-628,scale=1920:1200',
5857
//'-vf scale=2028:-1', // rescale width (and height relatively)
5958
// input file's resolution: 4056x3048 (1920*2=3840+216; 1080*2=2160+888)
6059
'-an',

src/main.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,8 @@ async function setupBot() {
4141
process.once('SIGTERM', () => bot.stop('SIGTERM'));
4242
}
4343

44-
setupBot().then(() => console.log('🚀 Bot is running!'));
44+
setupBot().then(() =>
45+
console.log(
46+
`🚀 Bot is running!\n(In chat [${process.env.TELEGRAM_CHAT_ID}], sharing to channel [${process.env.TELEGRAM_CHANNEL_ID}])`
47+
)
48+
);

0 commit comments

Comments
 (0)