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:
documentation
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
documentation
This scope let you generate PDF documentaion file based on markdown document.
kouyierr documentation generate --help
Usage: kouyierr documentation generate [OPTIONS]
Generate a new documentation from Markdown file based on TeX template
Options:
--output-dir TEXT Output directory, default=.
--markdown TEXT Markdown file path to use for documentation [required]
--output-file TEXT Output PDF filename, default=output.pdf
--template TEXT TeX template file path
--help Show this message and exit.
It can be summoned simply like:
cd tests/org_sample
kouyierr documentation generate --markdown README.md --template template.tex
Sample files can be found in this repo in the unittest folder:
- README.md: Markdown source file
- template.tex: LaTex template
- bottom.png: Image file used in LaTex template for bottom border
Generated file with these sample can also be found in this repo:
- draft.pdf: PDF file
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 tests/org_sample/myfancycompany.yml --invoice_config tests/org_sample/nicecustomer.yml --template tests/org_sample/myfancycompany.html.j2 # for bulk mode for all invoices from this client
kouyierr invoice generate --company_config tests/org_sample/myfancycompany.yml --invoice_config tests/org_sample/nicecustomer.yml --template tests/org_sample/myfancycompany.html.j2 --invoice_id 202011_CUS # for specific invoice
Sample files can be found in this repo in the unittest folder:
- 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
pip3 install .\[test\] --user --upgrade # for ZSH users
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
Docker image
For our unittests we built a docker image with requirements for kouyierr. You can use it as well from this repo
docker pull vmdude/kouyierr-docker
docker run -it vmdude/kouyierr-docker
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.11.tar.gz
.
File metadata
- Download URL: kouyierr-0.0.11.tar.gz
- Upload date:
- Size: 1.1 MB
- 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 | 14bde47f6b10133620ec95c69db940506e42539f2b7a678acecf94fac9d6625d |
|
MD5 | 2f09bb776db36241d1224774b8684373 |
|
BLAKE2b-256 | 943cde8f8ea1339a8da79dc8ab8b4c6abf3e3e1939244b947a8e50a58e783bac |
File details
Details for the file kouyierr-0.0.11-py3-none-any.whl
.
File metadata
- Download URL: kouyierr-0.0.11-py3-none-any.whl
- Upload date:
- Size: 10.5 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 | 0989bd78a2984d84787f0838323837facbf7b759b3461d84892fbbc683e18a8f |
|
MD5 | 9317e47dfd786e859a126bbbc2175cf3 |
|
BLAKE2b-256 | deaa27803f7da5bfcdf681dad606bd9482b889bf56a97c31d3b054fb10bdee13 |