git-vendor-name: MarkdownResume-Pipeline
git-vendor-dir: vendor/git.knownelement.com/reachableceo/MarkdownResume-Pipeline
git-vendor-repository: https://git.knownelement.com/reachableceo/MarkdownResume-Pipeline.git
git-vendor-ref: main
This commit is contained in:
Charles N Wyble 2024-12-15 08:31:48 -06:00
commit d6c0b35100

View File

@ -1,5 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail
##################################################################################################### #####################################################################################################
#Markdown to PDF/MSWord Resumek and candidate info sheet #Markdown to PDF/MSWord Resumek and candidate info sheet
##################################################################################################### #####################################################################################################
@ -8,7 +10,11 @@
# Create the candidate information PDF # Create the candidate information PDF
############################################# #############################################
$MO_PATH $PipelineClientWorkingDir/build/BuildTemplate-CandidateInfoSheet.yml > $BUILDYAML_CANDIDATEINFOSHEET # Expand variables into rendered YAML files. These will be used by pandoc to create the output artifacts
$MO_PATH $YamlInputTemplateFileJobBoard > $BUILDYAML_JOBBOARD
$MO_PATH $YamlInputTemplateFileClientSubmission > $BUILDYAML_CLIENTSUBMISSION
$MO_PATH $YamlInputTemplateFileClientSubmission > $BUILDYAML_CANDIDATEINFOSHEET
echo "Creating candidate info sheet..." echo "Creating candidate info sheet..."
@ -16,16 +22,13 @@ $MO_PATH $PipelineClientWorkingDir/Templates/MarkdownResume/CandidateInfoSheet/C
pandoc \ pandoc \
"$CandidateInfoSheetMarkdownOutputFile" \ "$CandidateInfoSheetMarkdownOutputFile" \
--template eisvogel \ --template $PANDOC_TEMPLATE \
--metadata-file="$PipelineClientWorkingDir/build-temp/MarkdownResume/CandidateInfoSheet.yml" \ --metadata-file="$BUILDYAML_CANDIDATEINFOSHEET" \
--from markdown \ --from markdown \
--to=pdf \ --to=pdf \
--output $CandidateInfoSheetPDFOutputFile --output $CandidateInfoSheetPDFOutputFile
# Expand variables into rendered YAML files. These will be used by pandoc to create the output artifacts
$MO_PATH $PipelineClientWorkingDir/build/BuildTemplate-JobBoard.yml > $BUILDYAML_JOBBOARD
$MO_PATH $PipelineClientWorkingDir/build/BuildTemplate-ClientSubmission.yml > $BUILDYAML_CLIENTSUBMISSION
echo "Combining markdown files into single input file for pandoc..." echo "Combining markdown files into single input file for pandoc..."
@ -124,38 +127,38 @@ echo "Generating PDF output for job board version..."
pandoc \ pandoc \
"$JobBoardMarkdownOutputFile" \ "$JobBoardMarkdownOutputFile" \
--template eisvogel \ --template $PANDOC_TEMPLATE \
--metadata-file="$PipelineClientWorkingDir/build-temp/MarkdownResume/JobBoard.yml" \ --metadata-file="$BUILDYAML_JOBBOARD" \
--from markdown \ --from markdown \
--to=pdf \ --to=pdf \
--output "$JobBoardPDFOutputFile" --output "$JobBoardPDFOutputFile"
echo "Generating MSWord output for job board version..."
pandoc \
"$JobBoardMarkdownOutputFile" \
--metadata-file="$PipelineClientWorkingDir/build-temp/MarkdownResume/JobBoard.yml" \
--from markdown \
--to=docx \
--reference-doc="$PipelineClientWorkingDir/build/resume-docx-reference.docx" \
--output "$JobBoardMSWordOutputFile"
echo "Generating PDF output for client submission version..." echo "Generating PDF output for client submission version..."
pandoc \ pandoc \
"$ClientSubmissionMarkdownOutputFile" \ "$ClientSubmissionMarkdownOutputFile" \
--template eisvogel \ --template "$PANDOC_TEMPLATE" \
--metadata-file="$PipelineClientWorkingDir/build-temp/MarkdownResume/ClientSubmission.yml" \ --metadata-file="$BUILDYAML_CLIENTSUBMISSION" \
--from markdown \ --from markdown \
--to=pdf \ --to=pdf \
--output "$ClientSubmissionPDFOutputFile" --output "$ClientSubmissionPDFOutputFile"
echo "Generating MSWord output for job board version..."
pandoc \
"$JobBoardMarkdownOutputFile" \
--metadata-file="$BUILDYAML_JOBBOARD" \
--from markdown \
--to=docx \
--reference-doc="$WordOutputReferenceDoc" \
--output "$JobBoardMSWordOutputFile"
echo "Generating MSWord output for client submission version..." echo "Generating MSWord output for client submission version..."
pandoc \ pandoc \
"$ClientSubmissionMarkdownOutputFile" \ "$ClientSubmissionMarkdownOutputFile" \
--metadata-file="$PipelineClientWorkingDir/build-temp/MarkdownResume/ClientSubmission.yml" \ --metadata-file="$BUILDYAML_CLIENTSUBMISSION" \
--from markdown \ --from markdown \
--to=docx \ --to=docx \
--reference-doc="$PipelineClientWorkingDir/build/resume-docx-reference.docx" \ --reference-doc="$WordOutputReferenceDoc" \
--output "$ClientSubmissionMSWordOutputFile" --output "$ClientSubmissionMSWordOutputFile"