automation

This commit is contained in:
2024-12-05 20:20:27 -06:00
parent cbc1881e55
commit 2e1759af8a
7 changed files with 231 additions and 8 deletions

View File

@@ -39,6 +39,9 @@ export DISCOURSE_APIKEY="$(bw get password APIKEY-discourse)"
post_dsr()
{
TODAY_DATE=$(date +%m-%d-%Y)
echo "Posting DSR..."
DISCOURSE_URL="https://community.turnsys.com" # e.g., https://forum.example.com
@@ -55,7 +58,7 @@ TITLE="Daily Stakeholder Report - $TODAY_DATE"
CONTENT="Please use the link below to download today's stakeholder report."
# The file to upload (from the second argument or auto-generated based on date)
FILE_PATH="./DSR-$TODAY_DATE.pdf"
FILE_PATH="../dsrtemp/DSR-$TODAY_DATE.pdf"
# Check if the file exists
if [ ! -f "$FILE_PATH" ]; then
@@ -125,4 +128,4 @@ secrets_manager
# - upload PDF to discourse
# - attach uploaded PDF to the topic
post_dsr
post_dsr