From c0dffd42fb7742dde25c4ac46c95f8e2272239fd Mon Sep 17 00:00:00 2001 From: Charles N Wyble Date: Sun, 15 Dec 2024 16:28:03 -0600 Subject: [PATCH] . --- .gitignore | 7 ++ local/StakeholderOutputVariables.env | 24 +++++++ .../build/BuildTemplate-StakeholderOutput.yml | 12 ++++ local/build/background5.pdf | 70 +++++++++++++++++++ .../build/build-stakeholder-output-client.sh | 49 +++++++++++++ 5 files changed, 162 insertions(+) create mode 100644 .gitignore create mode 100644 local/StakeholderOutputVariables.env create mode 100644 local/build/BuildTemplate-StakeholderOutput.yml create mode 100644 local/build/background5.pdf create mode 100644 local/build/build-stakeholder-output-client.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9cca5c4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +local/build-temp/*.md +local/build-temp/*.yml + +local/build-output/*.md +local/build-output/*.pdf + +StakeholderJoplin/* \ No newline at end of file diff --git a/local/StakeholderOutputVariables.env b/local/StakeholderOutputVariables.env new file mode 100644 index 0000000..2f1a2bc --- /dev/null +++ b/local/StakeholderOutputVariables.env @@ -0,0 +1,24 @@ +################################################### +# Modify these values to suit +################################################### + +############################################################################# +#SET THIS NEXT VARIABLE OR NOTHING WILL WORK!!!! + +export PipelineClientWorkingDir="D:/tsys/@ReachableCEO/DSR-Pipeline-ReachableCEO/local" + +#SET THE PREVIOUS VARIABLE OR NOTHING WILL WORK!!!! +############################################################################# + +########################################## +# Layout/title page /formatting options +########################################## + +export ReportAuthor="Charles N Wyble" +export AuthorTagline="Tenaciy. Velocity. Focus." +export AuthorLogo="D:/tsys/@ReachableCEO/ReachableCEO.png" +export SourceCode="https://git.knownelement.com/reachableceo/DSR_Pipeline-ReachableCEO" +export URLCOLOR="blue" +export PAGEBACKGROUND="$PipelineClientWorkingDir/build/background5.pdf" +export PANDOC_TEMPLATE="eisvogel" +export YamlInputTemplateFileStakeholderOutput="$PipelineClientWorkingDir/build/BuildTemplate-StakeholderOutput.yml" \ No newline at end of file diff --git a/local/build/BuildTemplate-StakeholderOutput.yml b/local/build/BuildTemplate-StakeholderOutput.yml new file mode 100644 index 0000000..4dc3a2c --- /dev/null +++ b/local/build/BuildTemplate-StakeholderOutput.yml @@ -0,0 +1,12 @@ +title: "{{ReportAuthor}} Daily Stakeholder Report : \today" +titlepage: true +titlepage-logo: "{{CandidateLogo}}" +date: \today +header-left: "\\hspace{1cm}" +header-center: "\\leftmark" +header-right: "Page \\thepage" +footer-left: "{{ReportAuthor}}" +footer-center: "{{AuthorTagline}}" +footer-right: "[Pipeline Source code]({{SourceCode}})" +urlcolor: {{URLCOLOR}} +page-background: "{{PAGEBACKGROUND}}" \ No newline at end of file diff --git a/local/build/background5.pdf b/local/build/background5.pdf new file mode 100644 index 0000000..f7839c3 --- /dev/null +++ b/local/build/background5.pdf @@ -0,0 +1,70 @@ +%PDF-1.5 +% +3 0 obj +<< /Length 4 0 R + /Filter /FlateDecode +>> +stream +xm;@ D=/18 K삢D +rƯ0f|%߅ 1Dg,7 +!ijҔP /chpxr‰1W^Qd%q!9ZDj UѪApr$&]x_ʑȽIW?fr)6EU +endstream +endobj +4 0 obj + 168 +endobj +2 0 obj +<< + /ExtGState << + /a0 << /CA 1 /ca 1 >> + >> +>> +endobj +5 0 obj +<< /Type /Page + /Parent 1 0 R + /MediaBox [ 0 0 595.275574 841.889771 ] + /Contents 3 0 R + /Group << + /Type /Group + /S /Transparency + /I true + /CS /DeviceRGB + >> + /Resources 2 0 R +>> +endobj +1 0 obj +<< /Type /Pages + /Kids [ 5 0 R ] + /Count 1 +>> +endobj +6 0 obj +<< /Creator (cairo 1.14.8 (http://cairographics.org)) + /Producer (cairo 1.14.8 (http://cairographics.org)) +>> +endobj +7 0 obj +<< /Type /Catalog + /Pages 1 0 R +>> +endobj +xref +0 8 +0000000000 65535 f +0000000582 00000 n +0000000282 00000 n +0000000015 00000 n +0000000260 00000 n +0000000354 00000 n +0000000647 00000 n +0000000774 00000 n +trailer +<< /Size 8 + /Root 7 0 R + /Info 6 0 R +>> +startxref +826 +%%EOF diff --git a/local/build/build-stakeholder-output-client.sh b/local/build/build-stakeholder-output-client.sh new file mode 100644 index 0000000..2cdb338 --- /dev/null +++ b/local/build/build-stakeholder-output-client.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +set -euo pipefail + +# This is a demo script for the DSR-Pipeline-Server +# This script creates PDF output from markdown input + + +###############@################################## +#Edit the below file to reflect your information +################################################## + +source "../StakeholderOutputVariables.env" + +#################################################### +#################################################### +#################################################### +#DO NOT CHANGE ANYTHING BELOW THIS LINE +#################################################### +#################################################### +#################################################### + +############################################################################################ +# Setup key variables that will be used by the create-stakeholder-output-server.sh script +############################################################################################ + +export MO_PATH="bash ../../vendor/git.knownelement.com/ExternalVendorCode/mo/mo" + +export BUILD_TEMP_DIR="$PipelineClientWorkingDir/build-temp" +export BUILD_OUTPUT_DIR="$PipelineClientWorkingDir/build-output" + +export BUILDYAML_STAKEHOLDER_OUTPUT="$BUILD_TEMP_DIR/StakeholderOutput.yml" +export StakeholderOutputMarkdownOutputFile="$BUILD_OUTPUT_DIR/StakeholderOutput.md" +export StakeholderOutputPDFOutputFile="$BUILD_OUTPUT_DIR/StakeholderOutput.pdf" + +export StakeholderOutputMarkdownInputFile="$1" + +echo "Cleaning up from previous runs..." + +rm $BUILDYAML_STAKEHOLDER_OUTPUT || true +rm $StakeholderOutputMarkdownOutputFile || true +rm $StakeholderOutputPDFOutputFile || true + +echo "Combining markdown files into single input file for pandoc..." +cat $StakeholderOutputMarkdownInputFile > $StakeholderOutputMarkdownOutputFile + +#Call the build stakeholder output microservice +echo "Calling the build stakeholder output microservice..." +bash ../../vendor/git.knownelement.com/reachableceo/DSR-Pipeline-Server/build/build-stakeholder-output-server.sh \ No newline at end of file