Document Generator, aka Doc As Code
Project description
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:
--year INTEGER Year of the invoice, default=current
--month INTEGER Month of the invoice, default=current
--company_config, --company TEXT
Company config file [required]
--invoice_config, --invoice TEXT
Invoice config file [required]
--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
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.9.tar.gz
.
File metadata
- Download URL: kouyierr-0.0.9.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a22790a2be28f3a9d58bbf8b60e5721670663e62511439bb5920f6e1c8ca777 |
|
MD5 | 15fb733ae2107c4f7d3e64b48e64ba53 |
|
BLAKE2b-256 | 1e93f889fbd863feb8c654b8f52067193256a19d10485328f51e2d1a4cbd9b60 |
File details
Details for the file kouyierr-0.0.9-py3-none-any.whl
.
File metadata
- Download URL: kouyierr-0.0.9-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e3246bd7f7243d9284301911c623b5dc0007e5e93b4533246c86a5cc5be9ac9 |
|
MD5 | 17276a07b877c0543258a99637b6483f |
|
BLAKE2b-256 | c2e4cb334946818e5b2b52283785dfcaaff6b0319a46094209aadcdf06abead4 |