Compare commits
26 Commits
24827b2b84
...
v1.0
Author | SHA1 | Date | |
---|---|---|---|
2b63732480 | |||
7653fcd05b | |||
d4d01a9c8f | |||
ef2fae024f | |||
8fc853b309 | |||
098970d877 | |||
9ab05711f3 | |||
5f3d41f8cb | |||
8cd36acfeb | |||
cb2b0e87df | |||
259a7fe7e2 | |||
a7bd749c1a | |||
055e32abab | |||
2b38f0f053 | |||
dc741450df | |||
a3ebb66979 | |||
6c882fe7e7 | |||
5b1120db68 | |||
4d17933dd9 | |||
d0de9b5c6a | |||
d5bc7841f7 | |||
5444ef0bce | |||
37098ccd06 | |||
119e8dfc39 | |||
0ecf6f0526 | |||
f6744e3393 |
26
README.md
26
README.md
@@ -1,15 +1,23 @@
|
|||||||
# MarkdownResume-Pipeline-ClientExample
|
# MarkdownResume-Pipeline-ClientExample
|
||||||
|
|
||||||
Example client repository for using the [MarkdownResume-Pipeline](https://git.knownelement.com/reachableceo/MarkdownResume-Pipeline) vendored repository.
|
Example client repository for using the [MarkdownResume-Pipeline](https://git.knownelement.com/reachableceo/MarkdownResume-Pipeline) resume building
|
||||||
|
microservice. The microservice is vendored into this repository.
|
||||||
|
|
||||||
## Quickstart
|
## Quickstart
|
||||||
|
|
||||||
I recommend doing these steps in order for efficency.
|
### Runtime Requirements
|
||||||
|
|
||||||
- Edit local/build/build-resume.sh and edit the values in the top section to refelct your information.
|
- Bash (this entire project was developed on msys2 on Windows 10)
|
||||||
- Edit local/Templates/WorkHistory/WorkHistory.csv
|
- Ensure you have pandoc installed and in your path.
|
||||||
- Create local/Templates/JobHistoryDetails/<position>.md to match the value in the first field of WorkHistory.csv
|
|
||||||
- Edit local/Templates/SkillsAndProjects/Projects.md
|
### Steps
|
||||||
- Edit local/Template/SkillsAndProjects/Skills.csv
|
|
||||||
- Edit local/Templates/CandidateInfoSheet.md
|
- Edit local/build/CandidateVariables.env to refelct your information.
|
||||||
- cd to the local/build directory and run bash build-resume.sh
|
- Edit local/Templates/MarkdownResume/WorkHistory/WorkHistory.csv
|
||||||
|
- Create and edit local/Templates/MarkdownResume/JobHistoryDetails/<position>.md to match the value in the first field of WorkHistory.csv
|
||||||
|
- Repeat as necessary for your job history.
|
||||||
|
- Edit local/Templates/MarkdownResume/SkillsAndProjects/Projects.md
|
||||||
|
- Edit local/Template/MarkdownResume/SkillsAndProjects/Skills.csv
|
||||||
|
- Edit local/Templates/MarkdownResume/CandidateInfoSheet.md
|
||||||
|
- cd to the local/build directory and run bash build-demo-markdown.sh
|
||||||
|
- Examine the PDF/MSWord output in local/build-output/*
|
||||||
|
3
local/Templates/JSONResume/certificates.csv
Normal file
3
local/Templates/JSONResume/certificates.csv
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# CSV File: certificates.csv
|
||||||
|
# Columns: name,date,issuer,url
|
||||||
|
Certified Kubernetes Administrator,2021-05-01,Cloud Native Computing Foundation,http://certificates.com/kubernetes
|
|
@@ -45,6 +45,16 @@ export SourceCode="https://git.knownelement.com/reachableceo/MarkdownResume-Pipe
|
|||||||
export URLCOLOR="blue"
|
export URLCOLOR="blue"
|
||||||
export PAGEBACKGROUND="./background3.pdf"
|
export PAGEBACKGROUND="./background3.pdf"
|
||||||
export JSONRESUME_THEME="professional"
|
export JSONRESUME_THEME="professional"
|
||||||
|
export PANDOC_TEMPLATE="eisvogel"
|
||||||
|
|
||||||
|
###########################
|
||||||
|
# Yaml files used by pandoc
|
||||||
|
###########################
|
||||||
|
|
||||||
|
export YamlInputTemplateFileCandidateInfoSheet="$PipelineClientWorkingDir/build/BuildTemplate-CandidateInfoSheet.yml"
|
||||||
|
export YamlInputTemplateFileJobBoard="$PipelineClientWorkingDir/build/BuildTemplate-JobBoard.yml"
|
||||||
|
export YamlInputTemplateFileClientSubmission="$PipelineClientWorkingDir/build/BuildTemplate-ClientSubmission.yml"
|
||||||
|
export WordOutputReferenceDoc="$PipelineClientWorkingDir/build/resume-docx-reference.docx"
|
||||||
|
|
||||||
##########################
|
##########################
|
||||||
# Candidate info sheet
|
# Candidate info sheet
|
||||||
|
@@ -1,62 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
|
|
||||||
# This is a demo script for the MarkdownResumePipeline server
|
|
||||||
# This script creates PDF/MSWord output from markdown/csv input
|
|
||||||
|
|
||||||
|
|
||||||
############################################
|
|
||||||
#Edit this file to reflect your information
|
|
||||||
############################################
|
|
||||||
|
|
||||||
source "./CandidateVariables.env"
|
|
||||||
|
|
||||||
####################################################
|
|
||||||
####################################################
|
|
||||||
####################################################
|
|
||||||
#DO NOT CHANGE ANYTHING BELOW THIS LINE
|
|
||||||
####################################################
|
|
||||||
####################################################
|
|
||||||
####################################################
|
|
||||||
|
|
||||||
######################################################################################
|
|
||||||
# Setup key variables that will be used by the build-pipeline-server-markdown.sh script
|
|
||||||
######################################################################################
|
|
||||||
|
|
||||||
export MO_PATH="bash ../../vendor/git.knownelement.com/ExternalVendorCode/mo/mo"
|
|
||||||
|
|
||||||
export BUILD_TEMP_DIR="$PipelineClientWorkingDir/build-temp/MarkdownResume"
|
|
||||||
export BUILD_OUTPUT_DIR="$PipelineClientWorkingDir/build-output/MarkdownResume"
|
|
||||||
|
|
||||||
export BUILDYAML_JOBBOARD="$BUILD_TEMP_DIR/JobBoard.yml"
|
|
||||||
export BUILDYAML_CLIENTSUBMISSION="$BUILD_TEMP_DIR/ClientSubmission.yml"
|
|
||||||
export BUILDYAML_CANDIDATEINFOSHEET="$BUILD_TEMP_DIR/CandidateInfoSheet.yml"
|
|
||||||
|
|
||||||
export CandidateInfoSheetMarkdownOutputFile="$BUILD_OUTPUT_DIR/recruiter/CandidateInfoSheet.md"
|
|
||||||
export CandidateInfoSheetPDFOutputFile="$BUILD_OUTPUT_DIR/recruiter/CandidateInfoSheet.pdf"
|
|
||||||
|
|
||||||
export JobBoardMarkdownOutputFile="$BUILD_OUTPUT_DIR/job-board/Candidate-Resume.md"
|
|
||||||
export JobBoardPDFOutputFile="$BUILD_OUTPUT_DIR/job-board/Candidate-Resume.pdf"
|
|
||||||
export JobBoardMSWordOutputFile="$BUILD_OUTPUT_DIR/job-board/Candidate-Resume.doc"
|
|
||||||
|
|
||||||
export ClientSubmissionMarkdownOutputFile="$BUILD_OUTPUT_DIR/client-submit/Candidate-Resume.md"
|
|
||||||
export ClientSubmissionPDFOutputFile="$BUILD_OUTPUT_DIR/client-submit/Candidate-Resume.pdf"
|
|
||||||
export ClientSubmissionMSWordOutputFile="$BUILD_OUTPUT_DIR/client-submit/Candidate-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
|
|
||||||
|
|
||||||
bash ../../vendor/git.knownelement.com/reachableceo/MarkdownResume-Pipeline/build/build-pipeline-server-markdown.sh
|
|
@@ -32,6 +32,8 @@ META
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
add_basics_section()
|
add_basics_section()
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -56,147 +58,47 @@ BASICS
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
add_work_section()
|
|
||||||
|
# Bash Function to Append JSON
|
||||||
|
add_profiles_section ()
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
local input_file=$JSON_TEMPLATE_DIRECTORY/work.csv
|
echo '{"profiles": [' >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
cat << 'WORK_START'
|
while IFS=, read -r username url network; do
|
||||||
|
cat <<EOF >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
"work": [
|
{
|
||||||
WORK_START
|
"username": "$username",
|
||||||
awk -F, 'NR>1 {
|
"url": "$url",
|
||||||
printf " {\n"
|
"network": "$network"
|
||||||
printf " \"name\": \"%s\",\n", $1
|
},
|
||||||
printf " \"position\": \"%s\",\n", $2
|
EOF
|
||||||
printf " \"url\": \"%s\",\n", $3
|
done < $JSON_TEMPLATE_DIRECTORY/profiles.csv
|
||||||
printf " \"startDate\": \"%s\",\n", $4
|
# Remove trailing comma and close JSON array
|
||||||
if ($5 != "") printf " \"endDate\": \"%s\",\n", $5
|
sed -i '$ s/},/}/' $BUILD_OUTPUT_DIR/resume.json
|
||||||
printf " \"summary\": \"%s\",\n", $6
|
echo ']}' >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
printf " \"highlights\": [\n \"%s\"\n ]\n", gensub(/\|/, "\",\n \"", "g", $7)
|
|
||||||
printf " }%s\n", (NR==NR?"":",")
|
|
||||||
}' "$input_file"
|
|
||||||
cat << 'WORK_END'
|
|
||||||
],
|
|
||||||
WORK_END
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
add_volunteer_section()
|
add_certificates_section()
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
local input_file="$JSON_TEMPLATE_DIRECTORY/volunteer.csv"
|
echo '{"certificates": [' >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
cat << 'VOLUNTEER_START' >> $BUILD_OUTPUT_DIR/resume.json
|
while IFS=, read -r name date issuer url; do
|
||||||
|
cat <<EOF >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
{
|
||||||
|
"name": "$name",
|
||||||
|
"date": "$date",
|
||||||
|
"issuer": "$issuer",
|
||||||
|
"url": "$url"
|
||||||
|
},
|
||||||
|
EOF
|
||||||
|
done < $JSON_TEMPLATE_DIRECTORY/certificates.csv
|
||||||
|
|
||||||
"volunteer": [
|
# Remove trailing comma and close JSON array
|
||||||
VOLUNTEER_START
|
sed -i '$ s/},/}/' $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
echo ']}' >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
awk -F, 'NR>1 {
|
|
||||||
printf " {\n"
|
|
||||||
printf " \"organization\": \"%s\",\n", $1
|
|
||||||
printf " \"position\": \"%s\",\n", $2
|
|
||||||
printf " \"url\": \"%s\",\n", $3
|
|
||||||
printf " \"startDate\": \"%s\",\n", $3
|
|
||||||
printf " \"endDate\": \"%s\",\n", $3
|
|
||||||
printf " \"summary\": \"%s\"\n", $4
|
|
||||||
printf " \"highlights\": ["
|
|
||||||
printf " " $7
|
|
||||||
printf " ]"
|
|
||||||
printf " }%s\n", (NR==NR?"":",")
|
|
||||||
}' "$input_file"
|
|
||||||
cat << 'VOLUNTEER_END'
|
|
||||||
],
|
|
||||||
VOLUNTEER_END
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
add_awards_section()
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
local input_file=$JSON_TEMPLATE_DIRECTORY/awards.csv
|
|
||||||
cat << 'AWARDS_START' >> $BUILD_OUTPUT_DIR/resume.json
|
|
||||||
"awards": [
|
|
||||||
AWARDS_START
|
|
||||||
awk -F, 'NR>1 {
|
|
||||||
printf " {\n"
|
|
||||||
printf " \"title\": \"%s\",\n", $1
|
|
||||||
printf " \"date\": \"%s\",\n", $2
|
|
||||||
printf " \"awarder\": \"%s\",\n", $3
|
|
||||||
printf " \"summary\": \"%s\"\n", $4
|
|
||||||
printf " }%s\n", (NR==NR?"":",")
|
|
||||||
}' "$input_file"
|
|
||||||
cat << 'AWARDS_END'
|
|
||||||
],
|
|
||||||
AWARDS_END
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
add_publications_section()
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
local input_file=$JSON_TEMPLATE_DIRECTORY/publications.csv
|
|
||||||
cat << 'PUBLICATIONS_START' >> $BUILD_OUTPUT_DIR/resume.json
|
|
||||||
"publications": [
|
|
||||||
PUBLICATIONS_START
|
|
||||||
awk -F, 'NR>1 {
|
|
||||||
printf " {\n"
|
|
||||||
printf " \"name\": \"%s\",\n", $1
|
|
||||||
printf " \"publisher\": \"%s\",\n", $2
|
|
||||||
printf " \"releaseDate\": \"%s\",\n", $3
|
|
||||||
printf " \"url\": \"%s\",\n", $4
|
|
||||||
printf " \"summary\": \"%s\"\n", $5
|
|
||||||
printf " }%s\n", (NR==NR?"":",")
|
|
||||||
}' "$input_file"
|
|
||||||
cat << 'PUBLICATIONS_END'
|
|
||||||
],
|
|
||||||
PUBLICATIONS_END
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
add_volunteer_section()
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
local input_file=$JSON_TEMPLATE_DIRECTORY/volunteer.csv
|
|
||||||
cat << 'VOLUNTEER_START' >> $BUILD_OUTPUT_DIR/resume.json
|
|
||||||
"volunteer": [
|
|
||||||
VOLUNTEER_START
|
|
||||||
awk -F, 'NR>1 {
|
|
||||||
printf " {\n"
|
|
||||||
printf " \"organization\": \"%s\",\n", $1
|
|
||||||
printf " \"position\": \"%s\",\n", $2
|
|
||||||
printf " \"url\": \"%s\",\n", $3
|
|
||||||
printf " \"startDate\": \"%s\",\n", $4
|
|
||||||
printf " \"summary\": \"%s\",\n", $5
|
|
||||||
printf " \"highlights\": [\n \"%s\"\n ]\n", gensub(/\|/, "\",\n \"", "g", $6)
|
|
||||||
printf " }%s\n", (NR==NR?"":",")
|
|
||||||
}' "$input_file"
|
|
||||||
cat << 'VOLUNTEER_END'
|
|
||||||
],
|
|
||||||
VOLUNTEER_END
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
add_skills_section()
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
local input_file="$JSON_TEMPLATE_DIRECTORY/skills.csv"
|
|
||||||
cat << 'SKILLS_START' >> $BUILD_OUTPUT_DIR/resume.json
|
|
||||||
"skills": [
|
|
||||||
SKILLS_START
|
|
||||||
awk -F, 'NR>1 {
|
|
||||||
printf " {\n"
|
|
||||||
printf " \"keywords\": [\n \"%s\"\n ],\n", gensub(/\|/, "\",\n \"", "g", $3)
|
|
||||||
printf " \"level\": \"%s\",\n", $2
|
|
||||||
printf " \"name\": \"%s\"\n", $1
|
|
||||||
printf " }%s\n", (NR==NR?"":",")
|
|
||||||
}' "$input_file"
|
|
||||||
cat << 'SKILLS_END'
|
|
||||||
],
|
|
||||||
SKILLS_END
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -204,64 +106,25 @@ add_education_section()
|
|||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
local input_file="$JSON_TEMPLATE_DIRECTORY/education.csv"
|
echo '{"education": [' >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
cat << 'EDUCATION_START' >> $BUILD_OUTPUT_DIR/resume.json
|
while IFS=, read -r institution url area studyType startDate endDate score courses; do
|
||||||
"education": [
|
cat <<EOF >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
EDUCATION_START
|
{
|
||||||
awk -F, 'NR>1 {
|
"institution": "$institution",
|
||||||
printf " {\n"
|
"url": "$url",
|
||||||
printf " \"institution\": \"%s\",\n", $1
|
"area": "$area",
|
||||||
if ($2 != "") printf " \"url\": \"%s\",\n", $2
|
"studyType": "$studyType",
|
||||||
printf " \"area\": \"%s\",\n", $3
|
"startDate": "$startDate",
|
||||||
printf " \"studyType\": \"%s\",\n", $4
|
"endDate": "$endDate",
|
||||||
printf " \"startDate\": \"%s\",\n", $5
|
"score": "$score",
|
||||||
printf " \"endDate\": \"%s\"", $6
|
"courses": [$(echo "$courses" | sed 's/;/","/g' | sed 's/^/"/;s/$/"/')]
|
||||||
if ($7 != "") printf ",\n \"score\": \"%s\"", $7
|
},
|
||||||
if ($8 != "") printf ",\n \"courses\": [\n \"%s\"\n ]", gensub(/\|/, "\",\n \"", "g", $8)
|
EOF
|
||||||
printf "\n }%s\n", (NR==NR?"":",")
|
done < $JSON_TEMPLATE_DIRECTORY/education.csv
|
||||||
}' "$input_file"
|
|
||||||
cat << 'EDUCATION_END'
|
|
||||||
],
|
|
||||||
EDUCATION_END
|
|
||||||
|
|
||||||
}
|
# Remove trailing comma and close JSON array
|
||||||
|
sed -i '$ s/},/}/' $BUILD_OUTPUT_DIR/resume.json
|
||||||
add_languages_section()
|
echo ']}' >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
local input_file="$JSON_TEMPLATE_DIRECTORY/languages.csv"
|
|
||||||
cat << 'LANGUAGES_START' >> $BUILD_OUTPUT_DIR/resume.json
|
|
||||||
"languages": [
|
|
||||||
LANGUAGES_START
|
|
||||||
awk -F, 'NR>1 {
|
|
||||||
printf " {\n"
|
|
||||||
printf " \"language\": \"%s\",\n", $1
|
|
||||||
printf " \"fluency\": \"%s\"\n", $2
|
|
||||||
printf " }%s\n", (NR==NR?"":",")
|
|
||||||
}' "$input_file"
|
|
||||||
cat << 'LANGUAGES_END'
|
|
||||||
],
|
|
||||||
LANGUAGES_END
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
add_interests_section()
|
|
||||||
|
|
||||||
{
|
|
||||||
local input_file="$JSON_TEMPLATE_DIRECTORY/interests.csv"
|
|
||||||
cat << 'INTERESTS_START' >> $BUILD_OUTPUT_DIR/resume.json
|
|
||||||
"interests": [
|
|
||||||
INTERESTS_START
|
|
||||||
awk -F, 'NR>1 {
|
|
||||||
printf " {\n"
|
|
||||||
printf " \"name\": \"%s\",\n", $1
|
|
||||||
printf " \"keywords\": [\n \"%s\"\n ]\n", gensub(/\|/, "\",\n \"", "g", $2)
|
|
||||||
printf " }%s\n", (NR==NR?"":",")
|
|
||||||
}' "$input_file"
|
|
||||||
cat << 'INTERESTS_END'
|
|
||||||
],
|
|
||||||
INTERESTS_END
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -269,22 +132,178 @@ add_references_section()
|
|||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
local input_file="$JSON_TEMPLATE_DIRECTORY/references.csv"
|
echo '{"references": [' >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
cat << 'REFERENCES_START' >> $BUILD_OUTPUT_DIR/resume.json
|
while IFS=, read -r reference name; do
|
||||||
"references": [
|
cat <<EOF >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
REFERENCES_START
|
{
|
||||||
awk -F, 'NR>1 {
|
"reference": "$reference",
|
||||||
printf " {\n"
|
"name": "$name"
|
||||||
printf " \"name\": \"%s\",\n", $1
|
},
|
||||||
printf " \"reference\": \"%s\"\n", $2
|
EOF
|
||||||
printf " }%s\n", (NR==NR?"":",")
|
done < $JSON_TEMPLATE_DIRECTORY/references.csv
|
||||||
}' "$input_file"
|
|
||||||
cat << 'REFERENCES_END'
|
# Remove trailing comma and close JSON array
|
||||||
]
|
sed -i '$ s/},/}/' $BUILD_OUTPUT_DIR/resume.json
|
||||||
REFERENCES_END
|
echo ']}' >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
add_skills_section()
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
echo '{"skills": [' >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
while IFS=, read -r name level keywords; do
|
||||||
|
cat <<EOF >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
{
|
||||||
|
"name": "$name",
|
||||||
|
"level": "$level",
|
||||||
|
"keywords": [$(echo "$keywords" | sed 's/;/","/g' | sed 's/^/"/;s/$/"/')]
|
||||||
|
},
|
||||||
|
EOF
|
||||||
|
done < $JSON_TEMPLATE_DIRECTORY/skills.csv
|
||||||
|
|
||||||
|
# Remove trailing comma and close JSON array
|
||||||
|
sed -i '$ s/},/}/' $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
echo ']}' >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
add_awards_section()
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
echo '{"awards": [' >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
while IFS=, read -r title awarder date summary; do
|
||||||
|
cat <<EOF >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
{
|
||||||
|
"title": "$title",
|
||||||
|
"awarder": "$awarder",
|
||||||
|
"date": "$date",
|
||||||
|
"summary": "$summary"
|
||||||
|
},
|
||||||
|
EOF
|
||||||
|
done < $JSON_TEMPLATE_DIRECTORY/awards.csv
|
||||||
|
|
||||||
|
# Remove trailing comma and close JSON array
|
||||||
|
sed -i '$ s/},/}/' $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
echo ']}' >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
add_publications_section()
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
echo '{"publications": [' >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
while IFS=, read -r name publisher releaseDate url summary; do
|
||||||
|
cat <<EOF >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
{
|
||||||
|
"name": "$name",
|
||||||
|
"publisher": "$publisher",
|
||||||
|
"releaseDate": "$releaseDate",
|
||||||
|
"url": "$url",
|
||||||
|
"summary": "$summary"
|
||||||
|
},
|
||||||
|
EOF
|
||||||
|
done < $JSON_TEMPLATE_DIRECTORY/publications.csv
|
||||||
|
|
||||||
|
# Remove trailing comma and close JSON array
|
||||||
|
sed -i '$ s/},/}/' $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
echo ']}' >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
add_volunteer_section()
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
echo '{"volunteer": [' >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
while IFS=, read -r organization position url startDate summary highlights; do
|
||||||
|
cat <<EOF >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
{
|
||||||
|
"organization": "$organization",
|
||||||
|
"position": "$position",
|
||||||
|
"url": "$url",
|
||||||
|
"startDate": "$startDate",
|
||||||
|
"summary": "$summary",
|
||||||
|
"highlights": [$(echo "$highlights" | sed 's/;/","/g' | sed 's/^/"/;s/$/"/')]
|
||||||
|
},
|
||||||
|
EOF
|
||||||
|
done < $JSON_TEMPLATE_DIRECTORY/volunteer.csv
|
||||||
|
|
||||||
|
# Remove trailing comma and close JSON array
|
||||||
|
sed -i '$ s/},/}/' $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
echo ']}' >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
add_work_section()
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
echo '{"work": [' >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
while IFS=, read -r name position location website startDate endDate summary highlights; do
|
||||||
|
cat <<EOF >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
{
|
||||||
|
"name": "$name",
|
||||||
|
"position": "$position",
|
||||||
|
"location": "$location",
|
||||||
|
"website": "$website",
|
||||||
|
"startDate": "$startDate",
|
||||||
|
"endDate": "$endDate",
|
||||||
|
"summary": "$summary",
|
||||||
|
"highlights": [$(echo "$highlights" | sed 's/;/","/g' | sed 's/^/"/;s/$/"/')]
|
||||||
|
},
|
||||||
|
EOF
|
||||||
|
done < $JSON_TEMPLATE_DIRECTORY/work.csv
|
||||||
|
|
||||||
|
# Remove trailing comma and close JSON array
|
||||||
|
sed -i '$ s/},/}/' $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
echo ']}' >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
add_languages_section()
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
echo '{"languages": [' >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
while IFS=, read -r language fluency; do
|
||||||
|
cat <<EOF >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
{
|
||||||
|
"language": "$language",
|
||||||
|
"fluency": "$fluency"
|
||||||
|
},
|
||||||
|
EOF
|
||||||
|
done < $JSON_TEMPLATE_DIRECTORY/languages.csv
|
||||||
|
|
||||||
|
# Remove trailing comma and close JSON array
|
||||||
|
sed -i '$ s/},/}/' $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
echo ']}' >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
add_interests_section()
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
echo '{"interests": [' >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
while IFS=, read -r name keywords; do
|
||||||
|
cat <<EOF >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
{
|
||||||
|
"name": "$name",
|
||||||
|
"keywords": [$(echo "$keywords" | sed 's/;/","/g' | sed 's/^/"/;s/$/"/')]
|
||||||
|
},
|
||||||
|
EOF
|
||||||
|
done < $JSON_TEMPLATE_DIRECTORY/interests.csv
|
||||||
|
|
||||||
|
# Remove trailing comma and close JSON array
|
||||||
|
sed -i '$ s/},/}/' $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
echo ']}' >> $BUILD_OUTPUT_DIR/resume.json
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
add_close_section()
|
add_close_section()
|
||||||
|
|
||||||
@@ -299,20 +318,19 @@ main()
|
|||||||
{
|
{
|
||||||
|
|
||||||
add_open_section
|
add_open_section
|
||||||
add_meta_section $JSON_TEMPLATE_DIRECTORY/meta.csv
|
add_meta_section
|
||||||
add_basics_section $JSON_TEMPLATE_DIRECTORY/basics.csv
|
add_basics_section
|
||||||
add_profiles_section $JSON_TEMPLATE_DIRECTORY/profiles.csv
|
add_profiles_section
|
||||||
add_work_section $JSON_TEMPLATE_DIRECTORY/work.csv
|
add_work_section
|
||||||
add_volunteer_section $JSON_TEMPLATE_DIRECTORY/volunteer.csv
|
add_volunteer_section
|
||||||
add_education-section $JSON_TEMPLATE_DIRECTORY/education.csv
|
add_education_section
|
||||||
add_awards_section $JSON_TEMPLATE_DIRECTORY/awards.csv
|
add_awards_section
|
||||||
add_certificates_section $JSON_TEMPLATE_DIRECTORY/certificates.csv
|
add_certificates_section
|
||||||
add_publications_section $JSON_TEMPLATE_DIRECTORY/publications.csv
|
add_publications_section
|
||||||
add_skills_section $JSON_TEMPLATE_DIRECTORY/skills.csv
|
add_skills_section
|
||||||
add_languages_section $JSON_TEMPLATE_DIRECTORY/languages.csv
|
add_languages_section
|
||||||
add_interests_section $JSON_TEMPLATE_DIRECTORY/interests.csv
|
add_interests_section
|
||||||
add_references_section $JSON_TEMPLATE_DIRECTORY/references.csv
|
add_references_section
|
||||||
add_projects_section $JSON_TEMPLATE_DIRECTORY/projects.csv
|
|
||||||
add_close_section
|
add_close_section
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -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"
|
Reference in New Issue
Block a user