From 495176ac2ae473526242d74a71a30dd42a3d9979 Mon Sep 17 00:00:00 2001 From: Charles N Wyble Date: Tue, 10 Dec 2024 15:41:49 -0600 Subject: [PATCH] Squashed 'vendor/git.knownelement.com/reachableceo/MarkdownResume-Pipeline/' changes from 5f86add..eaf5c35 eaf5c35 updated documentation to reflect client/server architecture e850a72 refactoring for proper client/server vendored use git-subtree-dir: vendor/git.knownelement.com/reachableceo/MarkdownResume-Pipeline git-subtree-split: eaf5c35ba155147ab82c74e9b14355329356093a --- README.md | 22 +--- build/{build.sh => build-demo.sh} | 6 + build/build-pipeline-server.sh | 195 ++++++++++++++++++++++++++++++ 3 files changed, 207 insertions(+), 16 deletions(-) rename build/{build.sh => build-demo.sh} (96%) create mode 100644 build/build-pipeline-server.sh diff --git a/README.md b/README.md index 229ef97..2ac4e8a 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ - [MarkdownResume-Pipeline](#markdownresume-pipeline) - [Introduction](#introduction) - - [Quickstart](#quickstart) - [Directory Overview](#directory-overview) - [Build pipeline](#build-pipeline) - [Outputs](#outputs) @@ -10,19 +9,9 @@ ## Introduction -Resume formatting/publication/management is difficult, tedious, annoying etc. The @ReachableCEO has hacked the process and made it easy! +Resume formatting/publication/management is difficult, tedious, annoying etc. The @ReachableCEO has hacked the process and made it easy! This repository is the core build scripts, templates etc used for resume management. It's meant as one half of a complete solution. -## Quickstart - -I recommend doing these steps in order for efficency. - -- Edit build/build.sh and alter the top section to refelct your information. -- Edit Templates/WorkHistory/WorkHistory.csv -- Create Templates/JobHistoryDetails/.md to match the value in the first field of WorkHistory.csv -- Edit SkillsAndProjects/Projects.md -- Edit SkillsAndProjects/Skills.csv -- Edit Templates/CandidateInfoSheet.md -- cd to the build directory and bash build.sh +Please see [MarkdownResum-Pipeline-ClientExample repository](https://git.knownelement.com/reachableceo/MarkdownResume-Pipeline-ClientExample) for the other half. You would clone that repository and follow the instructions. That repository has this repository vendored into it. ## Directory Overview @@ -30,7 +19,7 @@ I recommend doing these steps in order for efficency. - build-output: markdown file for pandoc gets placed here. If you want to make formatting changes before conversion to PDF/Word, you can do so. - build-temp: working directory for the build process. In case you need to debug an intermediate step. - Templates - - CandidateInfoSHeet: contains the markdown/yaml template files for a candidate information sheet. This allows you to produce a standardized reply to recruiters to eliminate an average of 6 emails/phone calls per inbound lead. It has a rate sheet and all the standard "matrix" tables they need to fill out for submission to an end client (or, in reality, to the US based recruiting team who interfaces with the client). + - CandidateInfoSheet: contains the markdown/yaml template files for a candidate information sheet. This allows you to produce a standardized reply to recruiters to eliminate an average of 6 emails/phone calls per inbound lead. It has a rate sheet and all the standard "matrix" tables they need to fill out for submission to an end client (or, in reality, to the US based recruiting team who interfaces with the client). - ContactInfo: contact info (one version for the recruiter facing resume, one version for client facing). - JobHistoryDetails: details for each position listed in WorkHistory/WorkHistory.csv. - SkillsAndProjects: This contains what the name says. Holds a skills.csv file that gets turned into a skills table and a projects file that gets placed at beginning of resume as a career highlights section. @@ -40,7 +29,8 @@ I recommend doing these steps in order for efficency. In the build directory: -- build.sh - Builds three assets: +- build-demo.sh - End to end self contained build example for testing the repository after changes to templates. +- build-pipeline-server.sh - Used by client repository to builds three assets: - PDF/Word for submitting to job portals - PDF/Word for submitting to end clients (strips cover sheet/contact info) - PDF of the candidate information sheet. @@ -56,7 +46,7 @@ In the build directory: This system is in production use by the @ReachableCEO: -- [MarkdownResume-ReachableCEO](https://git.knownelement.com/reachableceo/MarkdownResume-ReachableCEO) +- [MarkdownResume-ClientExample-ReachableCEO](https://git.knownelement.com/reachableceo/MarkdownResume-ReachableCEO) - [ReachableCEO Career Site](https://resume.reachableceo.com) - uploaded to all major job portals diff --git a/build/build.sh b/build/build-demo.sh similarity index 96% rename from build/build.sh rename to build/build-demo.sh index c074f60..5ec7826 100644 --- a/build/build.sh +++ b/build/build-demo.sh @@ -1,5 +1,11 @@ #!/usr/bin/env bash +# This is a demo used for testing the build pipeline end to end in a self contained way. + +# It's only used by developers of this repository for testing/validating changes. + +# Your client repository has a build-pipeline-client.sh script and it uses +# build-pipeline-server.sh, not this script. ################################################### # Modify these values to suit diff --git a/build/build-pipeline-server.sh b/build/build-pipeline-server.sh new file mode 100644 index 0000000..2b31825 --- /dev/null +++ b/build/build-pipeline-server.sh @@ -0,0 +1,195 @@ +#!/usr/bin/env bash + + +#################################################### +#DO NOT CHANGE ANYTHING BELOW THIS LINE +#################################################### + +############################################################ +# Setup globals +############################################################ + +readonly MO_PATH="bash ../vendor/git.knownelement.com/ExternalVendorCode/mo/mo" +readonly BUILD_OUTPUT_DIR="../build-output" +readonly BUILD_TEMP_DIR="../build-temp" +readonly BUILDYAML_JOBBOARD="$BUILD_TEMP_DIR/JobBoard.yml" +readonly BUILDYAML_CLIENTSUBMISSION="$BUILD_TEMP_DIR/ClientSubmission.yml" +readonly BUILDYAML_CANDIDATEINFOSHEET="$BUILD_TEMP_DIR/CandidateInfoSheet.yml" + +CandidateInfoSheetMarkdownOutputFile="$BUILD_OUTPUT_DIR/CandidateInfoSheet.md" +CandidateInfoSheetPDFOutputFIle="$BUILD_OUTPUT_DIR/CandidateInfoSheet.pdf" + +JobBoardMarkdownOutputFile="$BUILD_OUTPUT_DIR/job-board/Resume.md" +JobBoardPDFOutputFile="$BUILD_OUTPUT_DIR/job-board/Resume.pdf" +JobBoardMSWordOutputFile="$BUILD_OUTPUT_DIR/job-board/Resume.doc" + +ClientSubmissionMarkdownOutputFile="$BUILD_OUTPUT_DIR/client-submission/Resume.md" +ClientSubmissionPDFOutputFile="$BUILD_OUTPUT_DIR/client-submission//Resume.pdf" +ClientSubmissionMSWordOutputFile="$BUILD_OUTPUT_DIR/client-submission/Resume.doc" + +echo "Cleaning up from previous runs..." + +rm $BUILDYAML_CANDIDATEINFOSHEET +rm $CandidateInfoSheetMarkdownOutputFile +rm $CandidateInfoSheetPDFOutputFIle + +rm $BUILDYAML_JOBBOARD +rm $JobBoardMarkdownOutputFile +rm $JobBoardPDFOutputFile +rm $JobBoardMSWordOutputFile + +rm $BUILDYAML_CLIENTSUBMISSION +rm $ClientSubmissionMarkdownOutputFile +rm $ClientSubmissionPDFOutputFile +rm $ClientSubmissionMSWordOutputFile + +# Expand variables into rendered YAML files. These will be used by pandoc to create the output artifacts + +$MO_PATH ./BuildTemplate-CandidateInfoSheet.yml > $BUILDYAML_CANDIDATEINFOSHEET +$MO_PATH ./BuildTemplate-JobBoard.yml > $BUILDYAML_JOBBOARD +$MO_PATH ./BuildTemplate-ClientSubmission.yml > $BUILDYAML_CLIENTSUBMISSION + +echo "Creating candidate info sheet..." + +$MO_PATH ../Templates/CandidateInfoSheet/CandidateInfoSheet.md > $CandidateInfoSheetMarkdownOutputFile + +pandoc \ +"$CandidateInfoSheetMarkdownOutputFile" \ +--template eisvogel \ +--metadata-file="../build-temp/CandidateInfoSheet.yml" \ +--from markdown \ +--to=pdf \ +--output $CandidateInfoSheetPDFOutputFIle + +echo "Combining markdown files into single input file for pandoc..." + +# Create contact info md file +$MO_PATH ../Templates/ContactInfo/ContactInfo-JobBoard.md > $BUILD_TEMP_DIR/ContactInfo-JobBoard.md +$MO_PATH ../Templates/ContactInfo/ContactInfo-ClientSubmit.md > $BUILD_TEMP_DIR/ContactInfo-ClientSubmit.md + +#Pull in contact info +cat $BUILD_TEMP_DIR/ContactInfo-JobBoard.md >> $JobBoardMarkdownOutputFile +echo " " >> $JobBoardMarkdownOutputFile + +cat $BUILD_TEMP_DIR/ContactInfo-ClientSubmit.md >> $ClientSubmissionMarkdownOutputFile +echo " " >> $ClientSubmissionMarkdownOutputFile + +echo "## Career Highlights" >> $JobBoardMarkdownOutputFile +echo "## Career Highlights" >> $ClientSubmissionMarkdownOutputFile + +cat ../Templates/SkillsAndProjects/Projects.md >> $JobBoardMarkdownOutputFile +echo "\pagebreak" >> $JobBoardMarkdownOutputFile + +cat ../Templates/SkillsAndProjects/Projects.md >> $ClientSubmissionMarkdownOutputFile +echo "\pagebreak" >> $ClientSubmissionMarkdownOutputFile + +echo " " >> $JobBoardMarkdownOutputFile +echo "## Employment History" >> $JobBoardMarkdownOutputFile +echo " " >> $JobBoardMarkdownOutputFile + +echo " " >> $ClientSubmissionMarkdownOutputFile +echo "## Employment History" >> $ClientSubmissionMarkdownOutputFile +echo " " >> $ClientSubmissionMarkdownOutputFile + +#And here we do some magic... +#Pull in : + +# employer +# title +# start/end dates of employment +# long form position summary data from each position + +IFS=$'\n\t' +for position in \ +$(cat ../Templates/WorkHistory/WorkHistory.csv); do + +COMPANY="$(echo $position|awk -F ',' '{print $1}')" +TITLE="$(echo $position|awk -F ',' '{print $2}')" +DATEOFEMPLOY="$(echo $position|awk -F ',' '{print $3}')" + +echo " " >> "$JobBoardMarkdownOutputFile" +echo "**$COMPANY | $TITLE | $DATEOFEMPLOY**" >> $JobBoardMarkdownOutputFile +echo " " >> "$JobBoardMarkdownOutputFile" + +echo "**$COMPANY | $TITLE | $DATEOFEMPLOY**" >> $ClientSubmissionMarkdownOutputFile +echo " " >> "$ClientSubmissionMarkdownOutputFile" + +echo " " >> "$JobBoardMarkdownOutputFile" +cat ../Templates/JobHistoryDetails/$COMPANY.md >> "$JobBoardMarkdownOutputFile" +echo " " >> "$JobBoardMarkdownOutputFile" + +cat ../Templates/JobHistoryDetails/$COMPANY.md >> "$ClientSubmissionMarkdownOutputFile" +echo " " >> "$ClientSubmissionMarkdownOutputFile" +done + +#Pull in my skills and generate a beautiful table. + +echo "\pagebreak" >> $JobBoardMarkdownOutputFile +echo " " >> "$JobBoardMarkdownOutputFile" +echo "## Skills" >> "$JobBoardMarkdownOutputFile" +echo " " >> "$JobBoardMarkdownOutputFile" + +echo "\pagebreak" >> $ClientSubmissionMarkdownOutputFile +echo " " >> "$ClientSubmissionMarkdownOutputFile" +echo "## Skills" >> "$ClientSubmissionMarkdownOutputFile" +echo " " >> "$ClientSubmissionMarkdownOutputFile" + +#Table heading +echo "|Skill|Experience|Skill Details|" >> $JobBoardMarkdownOutputFile +echo "|---|---|---|" >> $JobBoardMarkdownOutputFile + +echo "|Skill|Experience|Skill Details|" >> $ClientSubmissionMarkdownOutputFile +echo "|---|---|---|" >> $ClientSubmissionMarkdownOutputFile + +#Table rows +IFS=$'\n\t' +for skill in \ +$(cat ../Templates/SkillsAndProjects/Skills.csv); do +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|" >> $JobBoardMarkdownOutputFile +echo "|**$SKILL_NAME**|$SKILL_YEARS|$SKILL_DETAIL|" >> $ClientSubmissionMarkdownOutputFile + +done +unset IFS + +echo "Generating PDF output for job board version..." + +pandoc \ +"$JobBoardMarkdownOutputFile" \ +--template eisvogel \ +--metadata-file="../build-temp/JobBoard.yml" \ +--from markdown \ +--to=pdf \ +--output $JobBoardPDFOutputFile + +echo "Generating MSWord output for job board version..." + +pandoc \ +"$JobBoardMarkdownOutputFile" \ +--metadata-file="../build-temp/JobBoard.yml" \ +--from markdown \ +--to=docx \ +--reference-doc=resume-docx-reference.docx \ +--output $JobBoardMSWordOutputFile + +echo "Generating PDF output for client submission version..." + +pandoc \ +"$ClientSubmissionMarkdownOutputFile" \ +--template eisvogel \ +--metadata-file="../build-temp/ClientSubmission.yml" \ +--from markdown \ +--to=pdf \ +--output $ClientSubmissionPDFOutputFile + +echo "Generating MSWord output for client submission version..." + +pandoc \ +"$ClientSubmissionMarkdownOutputFile" \ +--metadata-file="../build-temp/ClientSubmission.yml" \ +--from markdown \ +--to=docx \ +--reference-doc=resume-docx-reference.docx \ +--output $ClientSubmissionMSWordOutputFile \ No newline at end of file