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

Binary file not shown.

View File

@@ -1,8 +1,8 @@
#!/bin/bash
TODAY_DATE=$(date +%m-%d-%Y)
INPUT_FILE="./DSR-$TODAY_DATE.md"
OUTPUT_FILE="./DSR-$TODAY_DATE.pdf"
INPUT_FILE="../dsrtemp/@DailyStakeholderReports/Today/DSR-$TODAY_DATE.md"
OUTPUT_FILE="../dsrtemp/DSR-$TODAY_DATE.pdf"
METADATA_FILE="daily-stakeholder-report.yml"
TEMPLATE="eisvogel"
@@ -12,4 +12,4 @@ $INPUT_FILE \
--metadata-file=$METADATA_FILE \
--from markdown \
--to=pdf \
--output $OUTPUT_FILE
--output $OUTPUT_FILE

View File

@@ -0,0 +1,10 @@
title: Daily Stakeholder Report - \date
titlepage: true
header-left: "\\hspace{1cm}"
header-center: "\\leftmark"
header-right: "Page \\thepage"
footer-left: "Charles N Wyble"
footer-center: "Tenacity. Velocity. Focus."
footer-right: "[Source code](https://git.knownelement.com/reachableceo/DailyStakeholderReport-Pipeline/src/branch/main/dsr-publish/create-dsr-pdf.sh)"
page-background: "D:/tsys/@ReachableCEO/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background5.pdf"
titlepage-logo: "D:/tsys/@ReachableCEO/ReachableCEO.png"

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