2024-11-27 19:59:37 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2024-12-02 11:37:29 +00:00
|
|
|
|
|
|
|
##########################################################
|
|
|
|
#Global variables
|
|
|
|
##########################################################
|
2024-11-27 19:59:37 +00:00
|
|
|
|
|
|
|
IntermediateOutputFile="./output/intermediate/CharlesNWybleShortResume.md"
|
2024-12-02 11:37:29 +00:00
|
|
|
FinalOutputFilePDF="/d/tsys/@ReachableCEO/resume.reachableceo.com/non-cv/CharlesNWybleShortResume.pdf"
|
|
|
|
#FinalOutputFileHTML="/d/tsys/@ReachableCEO/resume.reachableceo.com/non-cv/CharlesNWybleShortResume.pdf"
|
|
|
|
#FinalOutputFileDOC="/d/tsys/@ReachableCEO/resume.reachableceo.com/non-cv/CharlesNWybleShortResume.pdf"
|
|
|
|
|
|
|
|
cleanup()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
rm ./output/intermediate/CharlesNWybleShortResume.md
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2024-11-27 19:59:37 +00:00
|
|
|
|
|
|
|
# Combine markdown files into single input file for pandoc
|
|
|
|
|
2024-11-28 20:36:38 +00:00
|
|
|
echo "Combining markdown files..."
|
2024-11-27 19:59:37 +00:00
|
|
|
|
2024-12-02 11:37:29 +00:00
|
|
|
createMdContact()
|
|
|
|
|
|
|
|
{
|
2024-11-27 19:59:37 +00:00
|
|
|
#Pull in my contact info
|
2024-11-28 20:36:38 +00:00
|
|
|
cat "../common/Contact-Info.md" >> $IntermediateOutputFile
|
2024-11-27 19:59:37 +00:00
|
|
|
echo " " >> $IntermediateOutputFile
|
|
|
|
|
2024-12-02 11:37:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
createMdSkills()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
2024-11-27 19:59:37 +00:00
|
|
|
#Pull in my skills
|
2024-11-28 19:00:01 +00:00
|
|
|
|
|
|
|
echo "## Skills" >> "$IntermediateOutputFile"
|
|
|
|
|
|
|
|
#Table heading
|
|
|
|
|
|
|
|
echo "|Skill|Experience|Skil Details|" >> $IntermediateOutputFile
|
|
|
|
echo "|---|---|---|" >> $IntermediateOutputFile
|
|
|
|
#Table rows
|
|
|
|
IFS=$'\n\t'
|
|
|
|
for skill in \
|
2024-12-02 11:37:29 +00:00
|
|
|
$(cat ./Skills.csv); do
|
2024-11-28 19:00:01 +00:00
|
|
|
SKILL_NAME="$(echo $skill|awk -F '|' '{print $1}')"
|
|
|
|
SKILL_YEARS="$(echo $skill|awk -F '|' '{print $2}')"
|
|
|
|
SKILL_DETAIL="$(echo $skill|awk -F '|' '{print $3}')"
|
|
|
|
echo "|**$SKILL_NAME**|$SKILL_YEARS|$SKILL_DETAIL|" >> $IntermediateOutputFile
|
|
|
|
done
|
|
|
|
unset IFS
|
2024-11-27 19:59:37 +00:00
|
|
|
|
2024-11-28 20:36:38 +00:00
|
|
|
echo "\pagebreak" >> $IntermediateOutputFile
|
|
|
|
|
2024-12-02 11:37:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
createMdProjects()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
2024-11-27 19:59:37 +00:00
|
|
|
#Pull in my projects
|
2024-12-02 12:10:34 +00:00
|
|
|
|
|
|
|
echo "## Projects" >> "$IntermediateOutputFile"
|
|
|
|
|
|
|
|
echo
|
2024-11-28 20:36:38 +00:00
|
|
|
cat "./Projects.md" >> $IntermediateOutputFile
|
2024-11-27 19:59:37 +00:00
|
|
|
echo " " >> $IntermediateOutputFile
|
|
|
|
|
2024-11-28 20:36:38 +00:00
|
|
|
echo "\pagebreak" >> $IntermediateOutputFile
|
|
|
|
|
2024-12-02 11:37:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
createMdWorkHistory()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
2024-11-27 19:59:37 +00:00
|
|
|
#Pull in my work history
|
2024-11-28 00:13:22 +00:00
|
|
|
|
2024-11-27 19:59:37 +00:00
|
|
|
echo " " >> $IntermediateOutputFile
|
2024-11-28 20:36:38 +00:00
|
|
|
echo "## Employment History" >> $IntermediateOutputFile
|
|
|
|
|
2024-12-02 10:34:09 +00:00
|
|
|
IFS=$'\n\t'
|
|
|
|
for position in \
|
|
|
|
$(cat ../common/WorkHistory.csv); do
|
|
|
|
|
|
|
|
COMPANY="$(echo $position|awk -F ',' '{print $1}')"
|
|
|
|
TITLE="$(echo $position|awk -F ',' '{print $2}')"
|
|
|
|
DATEOFEMPLOY="$(echo $position|awk -F ',' '{print $3}')"
|
|
|
|
|
2024-12-02 11:37:29 +00:00
|
|
|
echo " " >> "$IntermediateOutputFile"
|
|
|
|
echo "**$COMPANY** | $TITLE | $DATEOFEMPLOY" >> $IntermediateOutputFile
|
|
|
|
echo " " >> "$IntermediateOutputFile"
|
2024-12-02 10:34:09 +00:00
|
|
|
done
|
|
|
|
unset IFS
|
|
|
|
|
2024-12-02 16:14:52 +00:00
|
|
|
echo "\pagebreak" >> $IntermediateOutputFile
|
|
|
|
|
2024-12-02 11:37:29 +00:00
|
|
|
}
|
2024-12-02 10:34:09 +00:00
|
|
|
|
2024-12-02 11:37:29 +00:00
|
|
|
generateFinalOutputFilePdf()
|
2024-12-02 10:34:09 +00:00
|
|
|
|
2024-12-02 11:37:29 +00:00
|
|
|
{
|
2024-11-27 19:59:37 +00:00
|
|
|
|
2024-11-28 15:19:14 +00:00
|
|
|
# Run pandoc to generate PDF into output dir
|
2024-11-27 19:59:37 +00:00
|
|
|
|
2024-11-28 20:36:38 +00:00
|
|
|
echo "Generating PDF..."
|
|
|
|
|
2024-11-27 19:59:37 +00:00
|
|
|
pandoc \
|
2024-11-27 20:06:31 +00:00
|
|
|
$IntermediateOutputFile \
|
2024-11-27 19:59:37 +00:00
|
|
|
--template eisvogel \
|
2024-12-02 10:34:09 +00:00
|
|
|
--metadata-file=./HumanOutput-NonCV.yml \
|
2024-11-27 19:59:37 +00:00
|
|
|
--from markdown \
|
|
|
|
--to=pdf \
|
2024-12-02 11:37:29 +00:00
|
|
|
--output $FinalOutputFilePDF
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
cleanup
|
|
|
|
createMdContact
|
|
|
|
createMdProjects
|
|
|
|
createMdWorkHistory
|
2024-12-02 13:04:32 +00:00
|
|
|
createMdSkills
|
2024-12-02 11:37:29 +00:00
|
|
|
generateFinalOutputFilePdf
|