diff --git a/data/cv.json b/data/cv.json index a6015d4..9bfc87c 100644 --- a/data/cv.json +++ b/data/cv.json @@ -4,7 +4,6 @@ "jobTitle": "Platform Automation Engineer", "contact": { "email": "d.n.i.anglin@gmail.com", - "phone": "07XXX-XXX-XXX", "location": "Hertfordshire, UK" }, "links": { diff --git a/main.go b/main.go index 20634a9..5b1782e 100644 --- a/main.go +++ b/main.go @@ -40,6 +40,12 @@ func main() { } log.Println("INFO: JSON unmarshalling was successful.") + // if CV_CONTACT_PHONE is set then add it to the CV + phone := os.Getenv("CV_CONTACT_PHONE") + if len(phone) > 0 { + cv.Contact.Phone = phone + } + // Create the Output tex file log.Printf("INFO: Attempting to create output file %s...", cvOutputPath) if err = os.MkdirAll(cvOutputDir, 0750); err != nil { diff --git a/template/cv.tex.tmpl b/template/cv.tex.tmpl index 741a845..178d357 100644 --- a/template/cv.tex.tmpl +++ b/template/cv.tex.tmpl @@ -6,7 +6,7 @@ \cvtitle{<<.FirstName>> <<.LastName>>}{<<.JobTitle>>} \titleAndContact {\bf Email:} <<.Contact.Email>>\blank[none] - {\bf Phone:} <<.Contact.Phone>>\blank[none] + <>{\bf Phone:} <<.Contact.Phone>>\blank[none]<> {\bf Location:} <<.Contact.Location>>\blank[medium] {\bf GitLab:} \goto{<<.Links.GitLab>>}[url(https://<<.Links.GitLab>>)]\blank[none]