Dan Anglin
21d7b3c447
Changes: - Build the cv-builder tool using go build instead of mage -compile in the first stage. - The final docker image is now based on Alpine. - Create a copy function to copy the final CV from the temporary directory to the final destination. - Replace os.Rename with the custom copy function to support copying files between different filesystems.
46 lines
2.1 KiB
Markdown
46 lines
2.1 KiB
Markdown
# CV Builder
|
|
|
|
## Overview
|
|
|
|
This project parses a CV, written in JSON and generates it as a PDF document.
|
|
The PDF generation is completed in two steps:
|
|
|
|
1. The application parses the JSON document and generates a TEX file using the TEX template files located in the [templates](./templates) directory.
|
|
2. The application then uses ConTeXt to generate the final PDF document from the generated TEX file.
|
|
|
|
## Dependencies
|
|
|
|
If you are interested in generating your own CV, then below is a list of dependencies that you'll need to install:
|
|
|
|
- **Go:** Please go [here](https://go.dev/dl/) to download the latest version of the Go programming language.
|
|
- **ConTeXt:** You can go to the [installation page](https://wiki.contextgarden.net/Installation) to find out how to install ConTeXt for your Operating System.
|
|
- **The Carlito font (ttf-carlito):** In previous iterations of my CV I used the Calibri font. Carlito is the free, metric compatible alternative to this and is specified in the TEX template.
|
|
- For Ubuntu/Debian installation you can use `apt`:
|
|
```bash
|
|
$ apt install font-crosextra-carlito
|
|
```
|
|
- For Arch Linux you can use `pacman`:
|
|
```bash
|
|
$ pacman -S ttf-carlito
|
|
```
|
|
- Alternatively you can download the font from https://fontlibrary.org/en/font/carlito
|
|
- Once this font is installed you'll need to update ConTeXt so it can find the font when generating the PDF:
|
|
```bash
|
|
$ OSFONTDIR=/usr/share/fonts
|
|
$ mtxrun --script fonts --reload
|
|
```
|
|
|
|
## Generating the example PDF Document
|
|
|
|
You can generate a PDF from the example CV by running the following command:
|
|
|
|
```bash
|
|
$ go run . --input example/cv.json
|
|
```
|
|
|
|
This will create a file called `cv.pdf` which you can view in your favourite PDF viewer.
|
|
|
|
## Inspirations
|
|
|
|
- [The Markdown Resume](https://mszep.github.io/pandoc_resume/) - This project uses ConTeXt and pandoc to convert Markdown based CVs into multiple formats including PDF, HTML and DOCX. This is where I discovered ConTeXt.
|
|
- [melkir/resume](https://github.com/melkir/resume/tree/master) - This project generates CVs using Go and LaTeX.
|