You need Rocket.Chat - an app that sends weekly YNAB report to your Rocket.Chat instance via webhook

Nikola Kotur 0427ce2939 Docker in crontab detail 3 years ago
src d56d950d38 Documentation update 3 years ago
.gitignore 90a0d57555 Initial commit 3 years ago
Dockerfile 1e73e0dd6f Docker container to print version by default 3 years ago
LICENSE.txt 65848ebb51 Python skeleton from pyscaffold 3 years ago
README.md 0427ce2939 Docker in crontab detail 3 years ago
setup.cfg 4e6d6b8b61 Jinja2 is not needed 3 years ago
setup.py 65848ebb51 Python skeleton from pyscaffold 3 years ago

README.md

You Need Rocket.Chat

Weekly spending reports from YNAB to Rocket.chat.

Installation

YNRC is simple and complete Python package, so if you know how to handle Python packages you can use it right away. For example, to install it in your virutal environment you would:

python3 -m pip install git+ssh://git@git.kotur.org:8022/kotnik/ynrc.git

Branch master is guaranteed to be runnable at all times.

On the other hand, if you are not experienced with Python you can use Docker. Clone repository and build the container with:

docker build -t ynrc .

Afterwards you can run YNRC (or add it to your crontab, but remove --it parametar in case you do) as simple as:

docker run -it --rm ynrc weekly_report --ynab-api-key <add the rest of command line options, see --help>

Preparation

First you will need YNAB Personal Access Token. To create a new one follow this path in YNAB Web application: Account Settings -> Developer Settings -> New Personal Access Token. Visit official documentation for more information.

Then, create new incoming integration in Rocket.Chat by visiting Administration -> Integrations -> New -> Incoming page. Once you have all the tokens ready, you can run YNRC!

Usage

Help page explains it all:

usage: weekly_report [-h] [--version] --ynab-api-key YNAB_API_KEY --ynab-budget-name YNAB_BUDGET_NAME --rocketchat-webhook ROCKETCHAT_WEBHOOK
                     [--rocketchat-avatar-url ROCKETCHAT_AVATAR_URL] [-v] [-vv]

You Need Rocket.Chat: send weekly YNAB reports to your Rocket.Chat instance

optional arguments:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  --ynab-api-key YNAB_API_KEY
                        YNAB API key
  --ynab-budget-name YNAB_BUDGET_NAME
                        YNAB budget name
  --rocketchat-webhook ROCKETCHAT_WEBHOOK
                        Rocket.Chat webhook URL
  --rocketchat-avatar-url ROCKETCHAT_AVATAR_URL
                        Rocket.Chat user avatar URL
  -v, --verbose         set loglevel to INFO
  -vv, --very-verbose   set loglevel to DEBUG

License

Distributed under the MIT License. See LICENSE.txt for more information.