1. The application parses the JSON document and generates a TEX file using the TEX template files located in the https://codeflow.dananglin.me.uk/apollo/spruce/src/branch/main/internal/cmd/templates/tex[templates] directory.
The project includes a https://codeflow.dananglin.me.uk/apollo/spruce/src/branch/main/magefiles/mage.go[magefile] for automating the build and installation of the spruce binary.
The default install prefix is set to `/usr/local` so spruce will be installed to `/usr/local/bin/spruce`.
If you don't have sudo privileges or you want to change the install prefix you can set the `SPRUCE_INSTALL_PREFIX` environment variable before installing.
[source,console]
----
SPRUCE_INSTALL_PREFIX=~/.local mage install
----
=== With Go
If your `GOBIN` directory is included in your `PATH` then you can install spruce with Go.
If you have installed spruce with Mage, you can get the build information to confirm that you have installed the correct version.
[source,console]
----
$ spruce version --full
Spruce
Version: v0.1.0-14-ge503dbf
Git commit: e503dbf
Go version: go1.21.0
Build date: 2023-08-12T13:00:51Z
----
== Generating the example PDF Document
Once you've installed spruce you can generate a PDF from the example CV by running the following command:
[source,console]
----
spruce generate --input example/cv.json
----
This will create a file called `cv.pdf` which you can view in your favourite PDF viewer.
== Inspirations
- https://mszep.github.io/pandoc_resume/[The Markdown 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.
- https://github.com/melkir/resume/tree/master[melkir/resume:] This project generates CVs using Go and LaTeX.