No description
Find a file
m09 436870f0a8 Use correct poetry build tool specification
Signed-off-by: m09 <142691+m09@users.noreply.github.com>
2022-12-04 15:45:19 +01:00
.github/workflows Bump deps, upgrade poetry 2022-12-04 14:09:28 +01:00
invoicez Bump deps, upgrade poetry 2022-12-04 14:09:28 +01:00
tests Bump deps, upgrade poetry 2022-12-04 14:09:28 +01:00
.flake8 Bump deps, upgrade poetry 2022-12-04 14:09:28 +01:00
.gitignore First usable version 2020-10-09 09:07:39 +02:00
.pylintrc First usable version 2020-10-09 09:07:39 +02:00
codecov.yml First usable version 2020-10-09 09:07:39 +02:00
LICENSE First usable version 2020-10-09 09:07:39 +02:00
Makefile Bump deps, upgrade poetry 2022-12-04 14:09:28 +01:00
mypy.ini First usable version 2020-10-09 09:07:39 +02:00
poetry.lock Bump deps, upgrade poetry 2022-12-04 14:09:28 +01:00
pyproject.toml Use correct poetry build tool specification 2022-12-04 15:45:19 +01:00
README.md First usable version 2020-10-09 09:07:39 +02:00

invoicez

CI Status CD Status Test Coverage PyPI Project

Tool to handle invoices. It is currently not meant to be usable directly by people finding about the package on GitHub. Please open an issue if you want more details or want to discuss this solution.

Installation

With pip:

pip install invoicez

Directory Structure

invoicez works with big assumptions on the directory structure of your presentation repository. Among those assumptions:

  • your directory should be a git repository
  • it should contain a jinja2 LaTeX invoice template in the jinja2 directory, with a specific name (main.tex.jinja2)
  • your invoice folders should be contained in an organization/company folder. This is meant to avoid repeating the company details all over the place
root (git repository)
├── global-config.yml
├── jinja2
│   ├── main.tex.jinja2
├── assets
│   ├── img
│   │   ├── logo.png
│   │   └── signature.jpg
├── company1
│   └── company-config.yml
│       ├── invoice1.yml
│       └── invoice2.yml
└── company2
    └── company-config.yml
        ├── invoice1.yml
        └── invoice2.yml

Configuration

invoicez uses two configuration files to avoid repetition, one for your details and global values, one for the details of the company you're writing the invoice for.

Configuration merging

The company config is merged into the global config, you can use that fact to override global values for a specific company.

Using the configuration values

The values obtained from the merged configurations can be used directly in Jinja2 templates, or in LaTeX after a conversion from snake case to camel case: if the configuration contains the key user_email, it will be defined as the \UserEmail command in LaTeX.

Usage

See the --help flag of the invoicez command line tool.