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
kouyierr 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:
Generated file with these sample can also be found in this repo:
kouyierr 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
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
Sample files can be found in this repo in the unittest folder:
Generated file with these sample can also be found in this repo:
kouyierr ghproject
This scope let you generate a markdown file with a review of all issues related to a Github project, grouped by column/category.
kouyierr ghproject generate --help
Usage: kouyierr ghproject generate [OPTIONS]
Generate a changelog-lookalike .md file with all Github project issues grouped by category/column
Options:
--output-dir TEXT Output directory, default=.
--user-token TEXT Github personal access token used for authentication, use env_var for security reason [required]
--repo-owner TEXT Github repository owner (user or organization) [required]
--repo-name TEXT Github repository name [required]
--project TEXT Github project name [required]
--help Show this message and exit.
It can be summoned simply like:
kouyierr ghproject generate --user-token $GITHUB_PAT --repo-owner REPO_OWNER_OR_ORG --repo-name REPO_NAME --project MY_GITHUB_PROJECT
Generated sample file can also be found in this repo:
kouyierr resume
TODO
kouyierr timesheet
TODO
How to build
virtualenv venv
source venv/bin/activate
pip3 install .[test] --user --upgrade
pip3 install .\[test\] --user --upgrade
python3 setup.py test
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).