Metadata-Version: 2.1
Name: invoicez
Version: 3.1.1
Summary: Tool to handle invoices.
Home-page: https://github.com/m09/invoicez
License: Apache-2.0
Author: m09
Author-email: 142691+m09@users.noreply.github.com
Requires-Python: >=3.8.1,<4.0.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development :: Build Tools
Requires-Dist: GitPython (>=3.1.29,<4.0.0)
Requires-Dist: Jinja2 (>=3.1.2,<4.0.0)
Requires-Dist: PyYAML (>=6.0,<7.0)
Requires-Dist: click (>=8.1.3,<9.0.0)
Requires-Dist: coloredlogs (>=15.0.1,<16.0.0)
Description-Content-Type: text/markdown

# `invoicez`

[![CI Status](https://img.shields.io/github/workflow/status/m09/invoicez/CI?label=CI&style=for-the-badge)](https://github.com/m09/invoicez/actions?query=workflow%3ACI)
[![CD Status](https://img.shields.io/github/workflow/status/m09/invoicez/CD?label=CD&style=for-the-badge)](https://github.com/m09/invoicez/actions?query=workflow%3ACD)
[![Test Coverage](https://img.shields.io/codecov/c/github/m09/invoicez?style=for-the-badge)](https://codecov.io/gh/m09/invoicez)
[![PyPI Project](https://img.shields.io/pypi/v/invoicez?style=for-the-badge)](https://pypi.org/project/invoicez/)

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.

