preparing DSR automation procedure
This commit is contained in:
parent
25fe5cfd73
commit
d011825524
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
dsrtemp/
|
0
dsr-joplin-create/dsr-new.sh
Normal file
0
dsr-joplin-create/dsr-new.sh
Normal file
0
dsr-joplin-create/dsr-populate-objectives.sh
Normal file
0
dsr-joplin-create/dsr-populate-objectives.sh
Normal file
@ -1,9 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo "Creating PDF of DSR from markdown input via pandoc..."
|
TODAY_DATE=$(date +%m-%d-%Y)
|
||||||
|
INPUT_FILE="./DSR-$TODAY_DATE.md"
|
||||||
INPUT_FILE="./DSR-$(date +%m-%d-%Y).md"
|
OUTPUT_FILE="./DSR-$TODAY_DATE.pdf"
|
||||||
OUTPUT_FILE="./DSR-$(date +%m-%d-%Y).pdf"
|
|
||||||
METADATA_FILE="daily-stakeholder-report.yml"
|
METADATA_FILE="daily-stakeholder-report.yml"
|
||||||
TEMPLATE="eisvogel"
|
TEMPLATE="eisvogel"
|
||||||
|
|
@ -1,6 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
secrets_manager()
|
secrets_manager()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -42,9 +41,6 @@ post_dsr()
|
|||||||
{
|
{
|
||||||
echo "Posting DSR..."
|
echo "Posting DSR..."
|
||||||
|
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Replace these with your Discourse instance details
|
|
||||||
DISCOURSE_URL="https://community.turnsys.com" # e.g., https://forum.example.com
|
DISCOURSE_URL="https://community.turnsys.com" # e.g., https://forum.example.com
|
||||||
API_KEY="$DISCOURSE_APIKEY" # Your API key
|
API_KEY="$DISCOURSE_APIKEY" # Your API key
|
||||||
API_USERNAME="reachableceo" # API username or admin account
|
API_USERNAME="reachableceo" # API username or admin account
|
||||||
@ -53,13 +49,13 @@ API_USERNAME="reachableceo" # API username or admin account
|
|||||||
CATEGORY_ID=61
|
CATEGORY_ID=61
|
||||||
|
|
||||||
# The title for the post (generated here; customize as needed)
|
# The title for the post (generated here; customize as needed)
|
||||||
TITLE="Daily Stakeholder Report - $(date +'%m-%d-%Y')"
|
TITLE="Daily Stakeholder Report - $TODAY_DATE"
|
||||||
|
|
||||||
# The content of the post
|
# The content of the post
|
||||||
CONTENT="Please see the attached PDF for today's report."
|
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)
|
# The file to upload (from the second argument or auto-generated based on date)
|
||||||
FILE_PATH="./DSR-"$(date +%m-%d-%Y)".pdf"
|
FILE_PATH="./DSR-$TODAY_DATE.pdf"
|
||||||
|
|
||||||
# Check if the file exists
|
# Check if the file exists
|
||||||
if [ ! -f "$FILE_PATH" ]; then
|
if [ ! -f "$FILE_PATH" ]; then
|
||||||
@ -91,7 +87,7 @@ fi
|
|||||||
echo "File uploaded successfully. Short URL: $short_url"
|
echo "File uploaded successfully. Short URL: $short_url"
|
||||||
|
|
||||||
# Append the file link to the post content (Markdown format)
|
# Append the file link to the post content (Markdown format)
|
||||||
CONTENT="$CONTENT\n\n[Download the PDF]($short_url)"
|
CONTENT="$CONTENT\n\n[Download todays report in PDF format]($short_url)"
|
||||||
|
|
||||||
# Create the new topic
|
# Create the new topic
|
||||||
echo "Creating new topic..."
|
echo "Creating new topic..."
|
||||||
@ -118,10 +114,15 @@ else
|
|||||||
echo "$post_response"
|
echo "$post_response"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#Get discourse api key
|
#Get discourse api key
|
||||||
|
|
||||||
secrets_manager
|
secrets_manager
|
||||||
|
|
||||||
#Create a new topic and upload/attach PDF to the topic
|
# - Create a new topic
|
||||||
|
# - upload PDF to discourse
|
||||||
|
# - attach uploaded PDF to the topic
|
||||||
|
|
||||||
post_dsr
|
post_dsr
|
35
endstops/end-day.sh
Normal file
35
endstops/end-day.sh
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Wrap up my instrumented day into a (mostly) automated report and publish to discourse
|
||||||
|
|
||||||
|
# Gather DSR assets
|
||||||
|
|
||||||
|
# My manually entered notations
|
||||||
|
./dsr-input/dsr-gather-joplin-log.sh
|
||||||
|
|
||||||
|
# My gitea data
|
||||||
|
./dsr-input/dsr-gather-gitea.sh
|
||||||
|
|
||||||
|
# My redmine data
|
||||||
|
./dsr-input/dsr-gather-redmine.sh
|
||||||
|
|
||||||
|
# My wakapi data
|
||||||
|
./dsr-input/dsr-gather-waka-api.sh
|
||||||
|
|
||||||
|
# My activity watch data
|
||||||
|
./dsr-input/dsr-gather-activitywatch.sh
|
||||||
|
|
||||||
|
# My habit tracker data
|
||||||
|
./dsr-input/dsr-gather-habits.sh
|
||||||
|
|
||||||
|
# My health/fitnes data
|
||||||
|
./dsr-input/dsr-gather-fitness.sh
|
||||||
|
|
||||||
|
# My diet data
|
||||||
|
./dsr-input/dsr-gather-diet.sh
|
||||||
|
|
||||||
|
# Produce DSR PDF asset
|
||||||
|
./dsr-publish/create-dsr-pdf.sh
|
||||||
|
|
||||||
|
# Publish DSR to the world
|
||||||
|
./dsr-publish/publish-dsr.sh
|
9
endstops/start-day.sh
Normal file
9
endstops/start-day.sh
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Start my instrumented day
|
||||||
|
|
||||||
|
# Create a new blank DSR for the day
|
||||||
|
./dsr-joplin-create/dsr-new.sh
|
||||||
|
|
||||||
|
# Populate my Joplin note "Todays objectives" section based on Redmine due dates
|
||||||
|
./dsr-joplin-create/dsr-populate-objectives.sh
|
Loading…
Reference in New Issue
Block a user