use bash script

This commit is contained in:
Hugh Rundle 2024-09-15 14:11:30 +10:00
parent 3e9a22e8ab
commit c919c0ccf4
Signed by: hugh
GPG key ID: A7E35779918253F9
2 changed files with 12 additions and 1 deletions

11
get_party.sh Normal file
View file

@ -0,0 +1,11 @@
#!/bin/bash
# set envs and paths
source /home/cardigan/rss-discord-bot/venv/bin/activate
python /home/cardigan/rss-discord-bot/venv/bin/python3.11
DISCORD_CHANNEL=""
DISCORD_TOKEN=""
DISCORD_CARDIPARTY_PING=""
# let's go
cv api4 Event.get '{"select":["title","address.city","start_date","summary"],"join":[["Address AS address","LEFT",["loc_block_id.address_id","=","address.id"]]],"orderBy":{"start_date":"DESC"},"limit":1}' | ./webhook.py

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python3 #!/usr/bin/env python
from datetime import datetime from datetime import datetime
import json import json