From 88981882c44caa6fcb5837f3a081f007806d4514 Mon Sep 17 00:00:00 2001 From: Dan Anglin Date: Sun, 18 Aug 2019 04:07:19 +0100 Subject: [PATCH] feat: Added CV Summary JSON does not support splitting a string into multiple lines so I've changed the Summary field from string to []string. I've created a func called join that uses strings.Join() to concatenate all elements of Summary into a single string. --- data/cv.json | 10 +++++++++- main.go | 8 ++++++++ model.go | 2 +- template/cv.tex.tmpl | 2 +- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/data/cv.json b/data/cv.json index f20b8fd..ec36d20 100644 --- a/data/cv.json +++ b/data/cv.json @@ -11,7 +11,15 @@ "gitlab": "gitlab.com/dananglin", "github": "github.com/dananglin" }, - "summary": "To be completed.", + "summary": [ + "I am a Platform Automation Engineer with over four years of professional experience in DevOps and Platform Automation.", + "My experience ranges from provisioning VMs and automating software installation using Ansible and Puppet", + "to provisioning new Kubernetes environments using GitOps and creating Operators for the auto-provisioning and maintenance of PostgreSQL clusters on Kubernetes.", + "Throughout my time with Ocado Technology I have developed an interest in the Go programming language", + "and I would like to continue increasing my knowledge and experience in Go and use it more professionally.", + "I'm also keen on learning more about platform automation, platform monitoring and alerting and platform self healing.", + "As my career advances I aspire to use my knowledge and skills to become a respected Senior Engineer with a background in platform automation." + ], "technologies": [ { "category": "Programming Languages", diff --git a/main.go b/main.go index 38f0210..20634a9 100644 --- a/main.go +++ b/main.go @@ -5,6 +5,7 @@ import ( "io/ioutil" "log" "os" + "strings" "text/template" ) @@ -22,6 +23,7 @@ func main() { fmap := template.FuncMap{ "notLastElement": notLastElement, + "join": join, } // Read the JSON data @@ -65,3 +67,9 @@ func main() { func notLastElement(pos, length int) bool { return pos < length-1 } + +// join uses strings.Join to join all string elements into +// a single string. +func join(s []string) string { + return strings.Join(s, " ") +} diff --git a/model.go b/model.go index e718632..c9927dc 100644 --- a/model.go +++ b/model.go @@ -6,7 +6,7 @@ type Cv struct { JobTitle string `json:"jobTitle"` Contact Contact `json:"contact"` Links Links `json:"links"` - Summary string `json:"summary"` + Summary []string `json:"summary"` Technologies []Technologies `json:"technologies"` Employment []Experience `json:"employment"` Education []Experience `json:"education"` diff --git a/template/cv.tex.tmpl b/template/cv.tex.tmpl index a3d11b6..a9cdc22 100644 --- a/template/cv.tex.tmpl +++ b/template/cv.tex.tmpl @@ -14,7 +14,7 @@ \stoptitleAndContact \section{SUMMARY} - <<.Summary>> + <> \section{SKILLS SUMMARY} \starttabulate[|w(0.3\textwidth)lB|lp(0.7\textwidth)|]