From 176c58aa1486f093b412cfefe6dbae3b5939e19b Mon Sep 17 00:00:00 2001 From: mcguirepr89 Date: Wed, 1 Jun 2022 16:16:06 -0400 Subject: [PATCH] use variables in title, too --- scripts/config.php | 2 +- scripts/server.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/config.php b/scripts/config.php index 2fe8e92..26cc594 100644 --- a/scripts/config.php +++ b/scripts/config.php @@ -165,7 +165,7 @@ tgram://{bot_token}/{chat_id} twitter://{ConsumerKey}/{ConsumerSecret}/{AccessToken}/{AccessSecret} https://discordapp.com/api/webhooks/{WebhookID}/{WebhookToken} ..." style="vertical-align: top" name="apprise_input" cols="140" rows="5" type="text" >

- +

diff --git a/scripts/server.py b/scripts/server.py index 8c3a261..c9c6ac1 100755 --- a/scripts/server.py +++ b/scripts/server.py @@ -253,7 +253,7 @@ def sendAppriseNotifications(species, confidence, path): apobj.notify( body=body.replace("$sciname", species.split("_")[0]).replace("$comname", species.split("_")[1]).replace("$confidence", confidence).replace("$listenurl", listenurl), - title=title, + title=title.replace("$sciname", species.split("_")[0]).replace("$comname", species.split("_")[1]).replace("$confidence", confidence).replace("$listenurl", listenurl), ) if str(str(str([i for i in this_run if i.startswith('APPRISE_NOTIFY_NEW_SPECIES')]).split('=')[1]).split('\\')[0]) == "1": @@ -272,7 +272,7 @@ def sendAppriseNotifications(species, confidence, path): apobj.add(config) apobj.notify( body=body.replace("$sciname", species.split("_")[0]).replace("$comname", species.split("_")[1]).replace("$confidence", confidence).replace("$listenurl", listenurl) + " (only seen "+str(int(numberDetections)+1)+" times in last 7d)", - title=title, + title=title.replace("$sciname", species.split("_")[0]).replace("$comname", species.split("_")[1]).replace("$confidence", confidence).replace("$listenurl", listenurl) + " (only seen "+str(int(numberDetections)+1)+" times in last 7d)", ) con.close()