Socket
Socket
Sign inDemoInstall

kouyierr

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kouyierr

Document Generator, aka Doc As Code


Maintainers
1

Kouyierr (Arthouuur)

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:
  documentation
  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

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:

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:

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

# 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).

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc