Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tharvik/curriculum-vitae

Generate a odt/pdf CV from a toml config file
https://github.com/tharvik/curriculum-vitae

Last synced: 23 days ago
JSON representation

Generate a odt/pdf CV from a toml config file

Awesome Lists containing this project

README

        

[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/tharvik/curriculum-vitae/main.svg)](https://results.pre-commit.ci/latest/github/tharvik/curriculum-vitae/main)
[![Test and upload example's result](https://github.com/tharvik/curriculum-vitae/actions/workflows/test-build.yaml/badge.svg)](https://github.com/tharvik/curriculum-vitae/actions/workflows/test-build.yaml)

tl;dr: download [generated cv](https://nightly.link/tharvik/curriculum-vitae/workflows/test-build.yaml/main/cv.zip).

# How to build

You would need

- `>=dev-lang/python-3.11`
- `dev-python/pip`

For optional pdf generation with libreoffice backend

- `app-office/libreoffice || app-office/libreoffice-bin`: https://www.libreoffice.org
- `app-text/poppler`: https://poppler.freedesktop.org/
- for cleaning empty pages generated by libreoffice

For optional pdf generation with pandoc backend

- `app-text/pandoc-cli`: https://pandoc.org
- Gentoo users, you can find it in the haskell overlay

Then you can install it with

```sh
pip install .
```

# How to use

The main entrypoint is the executable, `cv`.
Feed it the wanted config, it will output the wanted format to stdout.

```sh
cv odt < config.toml > cv.odt
cv pdf < config.toml > cv.pdf
```

Or with your preferred viewer

```sh
cv pdf < config.toml | zathura -
```

You can also use the library directly.

```python
import tomlkit
from curriculum_vitae import generate

with open("config.toml") as f:
config = tomlkit.load(f)
doc = generate(config)
doc.write("cv.odt")
```