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:
- 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
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 # 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
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:
- project_loremipsum_tasks.md: Report file
kouyierr resume
TODO
kouyierr 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).
Metadata
Release files for kouyierr 0.0.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kouyierr-0.0.12.tar.gz | 1.1 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kouyierr-0.0.12-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.1 MB
Release files / kouyierr-0.0.12.tar.gz
| Download URL | kouyierr-0.0.12.tar.gz |
|---|---|
| Size | 1.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6d92fc78843677f5b3059060cd40fcecca54700e15fc17fd1abf3a5fbf738b27
|
|
BLAKE2b-256 checksum How to use checksums |
74c1fbcac90a6bb0ff3d4376b73b3e4bf51ce766508e14bc71a2260feda18667
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8
|
Release files / kouyierr-0.0.12-py3-none-any.whl
| Download URL | kouyierr-0.0.12-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
01c84612e436c9f16d9f65123c5652dccf2b1d4209eefcc2584f22f13dbab282
|
|
BLAKE2b-256 checksum How to use checksums |
f604aa0260d3eae3297dc9a39eefb8b074a23477674127326b6cd408682e511e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8
|