Document Generator, aka Doc As Code
Project description
Kouyierr (Arthouuur)
This project is basically a document generator (Doc As Code) focused on a few targets like invoices, timesheet, resume or documentation.
The initial goal was to avoid using Microsoft Wo@#$ and Ex@#$ to generate these recurrent documents, and to be able to add a little automation (of course we're lazy ^^).
Usage
This python module use click
to facilitate cli calls, help is self-explanatory:
kouyierr --help
Usage: kouyierr [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
invoice
version
We use rich Python module to add some fancy console display as well:
Scope
With click
module, we bundled several scope to make life easier
invoice
This scope let you generate HTML/PDF invoice file based on YAML definition file and Jinja2 template.
kouyierr invoice generate --help
Usage: kouyierr invoice generate [OPTIONS]
Generate a new invoice based on definition file and company template
Options:
--output-dir TEXT Output directory, default=.
--company_config TEXT Company config file [required]
--invoice_config TEXT Invoice config file [required]
--invoice_id TEXT Invoice ID, default=all
--template TEXT Template file path [required]
--help Show this message and exit.
It can be summoned simply like:
kouyierr invoice generate --company_config data/invoice/myfancycompany.yml --invoice_config data/invoice/nicecustomer.yml --template data/invoice/myfancycompany.html.j2 # for bulk mode for all invoices from this client
kouyierr invoice generate --company_config data/invoice/myfancycompany.yml --invoice_config data/invoice/nicecustomer.yml --template data/invoice/myfancycompany.html.j2 --invoice_id 202102_BLU # for specific invoice
Sample files can be found in this repo:
- myfancycompany.html.j2: Jinja2 template
- myfancycompany.yml: Company config file
- nicecustomer.yml: Invoice config file
Generated file with these sample can also be found in this repo:
- 202011_CUS.html: HTML file
- 202011_CUS.pdf: PDF file
resume
TODO
timesheet
TODO
How to build
# create a virtual env
virtualenv venv
# activate virtual env
source venv/bin/activate
# run test and package
pip3 install .[test] --user --upgrade
python3 setup.py test
# install snapshot build
pip3 install . --user --upgrade
Releases
After a commit or merge on master circleci deploys kouyierr automatically on pypi
To install the release version from PyPi:
pip3 install kouyierr --upgrade --user
Or you can install local version as well:
git clone git@github.com:vmdude/kouyierr.git && cd kouyierr
pip3 install . --upgrade --user
License
This project is licensed under the MIT License (see the
LICENSE
file for details).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file kouyierr-0.0.10.tar.gz
.
File metadata
- Download URL: kouyierr-0.0.10.tar.gz
- Upload date:
- Size: 343.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.23.0 setuptools/47.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95c7adcf14b84ed427cee92f4c716d55c95bdc9f4ea4330b1fcf5c5bf65d663f |
|
MD5 | f6b641178e87431b802e054cbdabff6b |
|
BLAKE2b-256 | 8e51a0f3f870113c75083c9f7c992205fbd4459202347b6c76bfc54cc0e7e778 |
File details
Details for the file kouyierr-0.0.10-py3-none-any.whl
.
File metadata
- Download URL: kouyierr-0.0.10-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.23.0 setuptools/47.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 110617dc10e2003999e3677d83e53a0a81b7671eba737e5e0d2a151f6112a44b |
|
MD5 | 811b65e30863276c65e8cd3edcccf4cb |
|
BLAKE2b-256 | c1967ea42516e07bb7bfac36a5186d8b83c4f761788bfcba11de5b8f4bef7289 |