Skip to main content

Document Generator, aka Doc As Code

Project description

GitHub tag GitHub license PyPI pyversions CircleCI

Kouyierr

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:

richsample

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:

Generated file with these sample can also be found in this repo:

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kouyierr-0.0.8.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

kouyierr-0.0.8-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file kouyierr-0.0.8.tar.gz.

File metadata

  • Download URL: kouyierr-0.0.8.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.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for kouyierr-0.0.8.tar.gz
Algorithm Hash digest
SHA256 82c81f006a69c2dbe18429d37fa15891a5c44a5389b0b2e9078604eff334c99b
MD5 4b6ca4c1c0031295dd23ce8254ee7659
BLAKE2b-256 432bf9c33264697b3fab6f89cab529c7887835a140dd066efc3c72de5bbd4067

See more details on using hashes here.

File details

Details for the file kouyierr-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: kouyierr-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for kouyierr-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 c4d1d6ce79d5722e85192ed3f29714b04e9ee8469d1d6f9d717b71789904e0a5
MD5 629fa9833402bca6e6e360e216954237
BLAKE2b-256 9fcbc9bc7f36c7d800ba3396a56523294004ae829fe40a24e4f3b74fc9b62f87

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page