Skip to content

Commit 84dc2d4

Browse files
committed
Update resume.
1 parent 21367e7 commit 84dc2d4

File tree

5 files changed

+49
-54
lines changed

5 files changed

+49
-54
lines changed

_data/resume.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@
711711
"skills": "Skills",
712712
"work": "Work Experience",
713713
"projects": "Projects",
714-
"volunteer": "Open-Source"
714+
"volunteer": "Volunteer"
715715
}
716716
},
717717
"section-item-ordering": {

resume.docx

-16 Bytes
Binary file not shown.

resume.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@
711711
"skills": "Skills",
712712
"work": "Work Experience",
713713
"projects": "Projects",
714-
"volunteer": "Open-Source"
714+
"volunteer": "Volunteer"
715715
}
716716
},
717717
"section-item-ordering": {

resume.pdf

0 Bytes
Binary file not shown.

scripts/resume/go-print-docx/cmd/render.go

+47-52
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ type Render struct {
3838
// Subtitle size
3939
Subtitle measurement.Distance `help:"Subtitle size." default:"14"`
4040
// H1 size
41-
H1 measurement.Distance `help:"H1 size." default:"24"`
41+
H1 measurement.Distance `help:"H1 size." default:"18"`
4242
// H2 size
43-
H2 measurement.Distance `help:"H2 size." default:"18"`
43+
H2 measurement.Distance `help:"H2 size." default:"16"`
4444
// H3 size
4545
H3 measurement.Distance `help:"H3 size." default:"14"`
4646
// H4 size
@@ -212,8 +212,7 @@ func (r *Render) Run(ctx *Context) error {
212212

213213
for i, contact := range resume.About.Contacts {
214214

215-
name := fmt.Sprintf("%s %s:", contact.Icon, contact.Label)
216-
run := r.addRun(para, name, r.Small)
215+
run := r.addRun(para, contact.Icon, r.Small)
217216
run.AddText(" ")
218217
r.addHyperLink(para, contact.URL, contact.URL, contact.URL, r.Small)
219218

@@ -245,6 +244,43 @@ func (r *Render) Run(ctx *Context) error {
245244
r.addRun(para, text, r.Normal)
246245
doc.AddParagraph() // Empty space
247246

247+
// Work
248+
r.addHeading(doc, resume.Data.SectionTitleMap.Docx.Work, 1)
249+
doc.AddParagraph() // Empty space
250+
251+
for _, work := range resume.Work {
252+
para = r.addHeading(doc, work.Position+", ", 2)
253+
r.addHyperLink(para, work.Organization, work.Organization, work.URL, r.levelToSize(3))
254+
r.addRun(para, fmt.Sprintf(" | *%s*", work.Location), r.levelToSize(4))
255+
256+
para = doc.AddParagraph()
257+
para.SetStyle("Normal")
258+
259+
start := textDateToShortDate(work.Start)
260+
end := "Present"
261+
262+
if work.End != "" {
263+
end = textDateToShortDate(work.End)
264+
}
265+
266+
r.addRun(para, fmt.Sprintf("%s - %s", start, end), r.Normal)
267+
268+
for _, highlight := range work.Highlights {
269+
doc.AddParagraph() // Empty space
270+
271+
highlightHeading := fmt.Sprintf("%s %s", highlight.Icon, highlight.Label)
272+
r.addHeading(doc, highlightHeading, 3)
273+
274+
doc.AddParagraph() // Empty space
275+
276+
para = doc.AddParagraph()
277+
para.SetStyle("Normal")
278+
r.addRun(para, highlight.Text, r.Normal)
279+
}
280+
281+
doc.AddParagraph() // Empty space
282+
}
283+
248284
// Projects
249285

250286
r.addHeading(doc, resume.Data.SectionTitleMap.Docx.Projects, 1)
@@ -283,52 +319,16 @@ func (r *Render) Run(ctx *Context) error {
283319
doc.AddParagraph() // Empty space
284320
}
285321

286-
// Work
287-
r.addHeading(doc, resume.Data.SectionTitleMap.Docx.Work, 1)
288-
doc.AddParagraph() // Empty space
289-
290-
for _, work := range resume.Work {
291-
para = r.addHeading(doc, work.Position+", ", 2)
292-
r.addHyperLink(para, work.Organization, work.Organization, work.URL, r.levelToSize(3))
293-
r.addRun(para, fmt.Sprintf(" | *%s*", work.Location), r.levelToSize(4))
294-
295-
para = doc.AddParagraph()
296-
para.SetStyle("Normal")
297-
298-
start := textDateToShortDate(work.Start)
299-
end := "Present"
300-
301-
if work.End != "" {
302-
end = textDateToShortDate(work.End)
303-
}
304-
305-
r.addRun(para, fmt.Sprintf("%s - %s", start, end), r.Normal)
306-
307-
for _, highlight := range work.Highlights {
308-
doc.AddParagraph() // Empty space
309-
310-
highlightHeading := fmt.Sprintf("%s %s", highlight.Icon, highlight.Label)
311-
r.addHeading(doc, highlightHeading, 3)
312-
313-
doc.AddParagraph() // Empty space
314-
315-
para = doc.AddParagraph()
316-
para.SetStyle("Normal")
317-
r.addRun(para, highlight.Text, r.Normal)
318-
}
319-
320-
doc.AddParagraph() // Empty space
321-
}
322-
323322
// Volunteer
324323
r.addHeading(doc, resume.Data.SectionTitleMap.Docx.Volunteer, 1)
325324
doc.AddParagraph() // Empty space
326325

327326
order = resume.Data.SectionItemOrdering.Docx.Volunteer
328327

329-
preamble := "Projects I’ve contributed to in the past (usually by fixing fairly small issues I encounter while trying things out):"
330-
331-
items := []string{}
328+
preamble := "Projects I’ve contributed to in the past (usually by fixing fairly small issues I encounter while trying them out):"
329+
para = doc.AddParagraph()
330+
r.addRun(para, preamble, r.Normal)
331+
doc.AddParagraph() // Empty space
332332

333333
for _, item := range order {
334334
var volunteer models.VolunteerExperience
@@ -342,15 +342,10 @@ func (r *Render) Run(ctx *Context) error {
342342

343343
// Render single link
344344
link := volunteer.Links[0]
345-
text := fmt.Sprintf("%s %s (%s)", volunteer.Icon, volunteer.Name, link.URL)
346-
items = append(items, text)
345+
text := fmt.Sprintf("%s %s - %s", volunteer.Icon, volunteer.Name, link.URL)
346+
para = doc.AddParagraph()
347+
r.addRun(para, text, r.Normal)
347348
}
348-
joined := strings.Join(items, ", ")
349-
para = doc.AddParagraph()
350-
r.addRun(para, preamble, r.Normal)
351-
doc.AddParagraph() // Empty space
352-
para = doc.AddParagraph()
353-
r.addRun(para, joined, r.Normal)
354349

355350
// Save the document
356351
fmt.Printf("Saving resume to: %s\n", r.Output)

0 commit comments

Comments
 (0)