change: print phone number when set via CV_CONTACT_PHONE

This commit is contained in:
Dan Anglin 2019-08-24 05:03:08 +01:00
parent d18c3e3bdd
commit 45c239b5c0
No known key found for this signature in database
GPG key ID: 7AC2B18EC1D09F27
3 changed files with 7 additions and 2 deletions

View file

@ -4,7 +4,6 @@
"jobTitle": "Platform Automation Engineer", "jobTitle": "Platform Automation Engineer",
"contact": { "contact": {
"email": "d.n.i.anglin@gmail.com", "email": "d.n.i.anglin@gmail.com",
"phone": "07XXX-XXX-XXX",
"location": "Hertfordshire, UK" "location": "Hertfordshire, UK"
}, },
"links": { "links": {

View file

@ -40,6 +40,12 @@ func main() {
} }
log.Println("INFO: JSON unmarshalling was successful.") 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 // Create the Output tex file
log.Printf("INFO: Attempting to create output file %s...", cvOutputPath) log.Printf("INFO: Attempting to create output file %s...", cvOutputPath)
if err = os.MkdirAll(cvOutputDir, 0750); err != nil { if err = os.MkdirAll(cvOutputDir, 0750); err != nil {

View file

@ -6,7 +6,7 @@
\cvtitle{<<.FirstName>> <<.LastName>>}{<<.JobTitle>>} \cvtitle{<<.FirstName>> <<.LastName>>}{<<.JobTitle>>}
\titleAndContact \titleAndContact
{\bf Email:} <<.Contact.Email>>\blank[none] {\bf Email:} <<.Contact.Email>>\blank[none]
{\bf Phone:} <<.Contact.Phone>>\blank[none] <<if .Contact.Phone>>{\bf Phone:} <<.Contact.Phone>>\blank[none]<<end>>
{\bf Location:} <<.Contact.Location>>\blank[medium] {\bf Location:} <<.Contact.Location>>\blank[medium]
{\bf GitLab:} \goto{<<.Links.GitLab>>}[url(https://<<.Links.GitLab>>)]\blank[none] {\bf GitLab:} \goto{<<.Links.GitLab>>}[url(https://<<.Links.GitLab>>)]\blank[none]