Resume as code

Andrei Zhozhin

| 5 minutes

Looking for ultimate resume format

I’m not frequently updating my resume (CV) but when I do I want to keep track of all changes and preferably store my resume in a plain text format to be able to use diff tools. A long time ago I was using Word documents to track different versions of my resume, but it was no simple way to check what have changed from one version to another and it was pain. After some time struggling I switched to the LaTeX version of a resume, it was much better from source code, yes we can call latex files as source as they are being compiled to PDF. But this approach had one HUGE drawback: you need to know TeX/LaTeX to make changes to the visual presentation of the document. It was kind of fine for me because I was using LaTeX extensively in University and was able to tweak templates, but I was not an expert to make more dramatic changes.

I’ve used the LaTeX version for some time but at some point, I’ve realized that to archive what I wanted to do I would need to create a new template from scratch and it was not the type of activity I would like to do at that point.

The solution (back 6-7 years back) was to switch to markdown/asciidoc and keep the resume in plain text format and render it as HTML and then convert HTML to PDF. This solution kind of “worked” for the first iteration but then I’ve realized that I don’t have that level of control over page layout as browsers have their quirks and I had no time to fight with them. The main reason I was not satisfied was - no possibility to control multi-column layout for different blocks.

Multi-column layouts

At some point, I’ve found the solution with asciidoc and ODT (Open Document Template format) backend, which allows rendering plaintext into “Word” document keeping all formatting and styling from OpenOffice/LibreOffice.

That was it, this solution provides full control over rendering logic, you can keep styles separately from content (like data, template, and styles).

How it works

We would need the following building blocks:

  • content (text of your resume formatted with asciidoc following conventions)
  • asciidoc engine to render
  • asciidoc ODT backend to generate output into Open Document format
  • ODT theme with styles for your resume
  • OpenOffice/LibreOffice to see how it looks and export as PDF (if required)

Document flow

This might look too complicated but in reality, once you have a full setup in place you would only need to care about what to write into your resume.

Installation and configuration

I’m using Windows with WSL, so I would provide steps on how to configure it there, these instructions would be compatible with Linux and macOS as well.

apt-get install asciidoc3

Download and install ODT backend and Theme

asciidoc --backend install odt-backend.zip
asciidoc --theme install cv-theme.zip

Rendering your resume

After you have initial setup there is just a simple command to generate output document

asciidoc -b odt cv.asciidoc

This command would produce cv.fodt (flat ODT file) that could be opened by OpenOffice/LibreOffice.

And to generate cv.pdf out of cv.fodt

soffice --convert-to pdf:writer_pdf_Export cv.fodt

Now you can define new pipeline for your git repository and build your resume on every commit!

Styling

Some tweaks I’m recommend to change from default theme (~/.asciidoc/themes/cv/cv.odt.styles):

  • Fonts for all main styles
<!-- font-face-decls -->
<office:font-face-decls>
  <style:font-face style:name="serif"         svg:font-family="Calibri" .../>
  <style:font-face style:name="sans-serif"    svg:font-family="Calibri" .../>
  <style:font-face style:name="article-title" svg:font-family="Helvetica Neue Ultra Light" ./>
  <style:font-face style:name="article-sect1" svg:font-family="Helvetica Neue Light" .../>
  <style:font-face style:name="article-sect2" svg:font-family="Helvetica Neue"  .../>
  <style:font-face style:name="title"         svg:font-family="Helvetica Neue"  .../>
  <style:font-face style:name="monospace"     svg:font-family="Liberation Mono" .../>
</office:font-face-decls>
  • Size of the text
<!-- Default styles -->
<style:default-style style:family="text">
  <style:text-properties 
    fo:color="#000000" style:font-name="sans-serif" fo:font-size="10pt" .../>
</style:default-style>
  • Remove “extra” effects for header
<style:style 
  style:name="sect0" style:family="paragraph" style:parent-style-name="sect-default">
  <style:paragraph-properties 
     fo:margin-top="0mm" fo:margin-bottom="0mm" fo:padding="0mm"/>
  <style:text-properties 
     fo:color="#000000" style:font-name="article-title" fo:font-size="20pt"/>
<!--  <style:text-properties 
        fo:color="#000000" style:text-outline="true" style:font-name="article-title" 
        fo:font-size="20pt" fo:text-shadow="1pt 1pt"/>-->
 </style:style>

I recommend to walk through other styles as well to understand how it works.

asciidoc -b odt --theme mytheme document.txt

Selecting non-standard theme, you can clone default cv theme (~/.asciidoc/themes/cv/cv.odt.styles)

Multi-column support

One of the main reasons to switch to asciidoc + odf was multi-column support.

Two column example

[cols=2]
=== Training and certification
*Red Hat certified* ~- https://www.redhat.com/.../?certId=120-040-951[verify]~
  - Red Hat Enterprise Performance Tuning (RH442)
  - Red Hat Certified Engineer (RHCE) ~- Scored 100%~
  - Red Hat Certified Administrator (RHCSA) ~- Scored 100%~

*ITIL v3 Foundation (ILFN) certified* ~- https://www.exin.com/...[verify] 5534051.20471350~

*PRINCE2 Foundation (PRI2F) certified* ~- https://www.exin.com/...[verify] 5534051.20487125~

*Linux Professional Institute certified* ~- http://cs.lpi.org/caf/......[verify]~
  - LPI Certification level 3 (LPIC-3) ~- Senior level~
  - LPI Certification level 2 (LPIC-2) ~- Advanced level~
  - LPI Certification level 1 (LPIC-1) ~- Junior level~

*Process Communication Model (PCM) training*

Rendered section Two column rendered example

Tree column example

=== Public speaking
On various occasions I have presented about different Linux and Open Source
topics, including at the following conferences:

[cols=3]
--
  - *NLUUG*, Utrecht, NL ~2014, 2015~
  - *Ansible Meetup*, Utrecht, NL ~2015~
  - *LinuxTag*, Berlin, DE ~2008, 2012, 2014~
  - *FlossUK*, UK ~2012 - 2014~
  - *CfgMgmtCamp*, Ghent, BE ~2014~
  - *LOADays*, Antwerp, BE ~2012, 2013~
  - *T-DOSE*, Eindhoven, NL ~2007 - 2012~
  - *ODF Plugfest*, Brussels, BE ~2012~
  - *LinuxCon Europe*, Prague, CZ ~2011~
  - *LibreOffice Conference*, Paris, FR ~2011~
  - *Linux Symposium*, Tokyo, JP ~2009~
  - *FrOSCon*, Bonn, DE ~2007 - 2009~
  - *FOSDEM*, Brussels, BE ~2007 - 2009~
  - *JRSL*, Buenos Aires, AR ~2008~
  - *NLLGG*, Utrecht, BE ~2008~
  - *LinuxWorld Expo*, Brussels, BE ~2008~
  - *LinuxWorld Expo*, Utrecht, NL ~2007~
  - *Linuxconf.eu*, Cambridge, UK ~2007~
--

Rendered section Three column rendered example

Complete example

You can check full source code in this repository

Summary

After numerous iterations, I’ve come to a solution that combines the benefits of plain text format (asciidoc) with the power of full-blown desktop word processors (like OpenOffice/LibreOffice) that allows full control on rendering. It also supports extensive styling options (using CSS like constructs) that are much more familiar to developers than LaTeX instructions (which are used primarily in the academic area). There is a learning curve to start with this approach but results are worth the efforts.

Related content

Elliptic curve cryptography
Riding blockchain