removed Python and the Python Script, added the apprise-api docker container to the Docker-compose to send notificaiton
This commit is contained in:
16
src/sendNotificationPy.ts
Normal file
16
src/sendNotificationPy.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import * as Bun from "bun";
|
||||
|
||||
export async function sendNotificationPy(title: string, body: string, click?: string | null) {
|
||||
const command = [
|
||||
"python3",
|
||||
"./src/notification.py",
|
||||
`--title=${title}`,
|
||||
`--body=${body}`,
|
||||
];
|
||||
if ( click ) {
|
||||
command.push(`--click=${click}`);
|
||||
}
|
||||
const proc = Bun.spawn(command);
|
||||
const text = await proc.stdout.text();
|
||||
console.log("sendNotification: " + text);
|
||||
}
|
||||
Reference in New Issue
Block a user