Skip to content

rmachuca89/trello-reports

Repository files navigation

Trello Reports

CI Codecov

Repository to interact with the Trello API and generate required reports.

Example: python3 weekly-todo-report.py

Weekly report to get all the cards that are under the Done list in my TODO-List board.

Sample Output:

$ ./weekly-todo-report.py
####################
TODO List Weekly Report
Date: 2021-07-22 22:42:31.269518
####################
--------------------
Tasks Done
--------------------
Monthly Email Housekeeping
Finish Essay
Fix Computer

INFO: Current setup requires to manually install dependencies on a python *environment as described below. Better packaging and possible upload to PyPi *may be planned in a future release.

Setup and Build

Project is under poetry package and dependency manager

$ poetry install

Then source the environment variables with corresponding values (TRELLO_API_KEY and TRELLO_API_SECRET). See this link as a reference to generate them.

And finally run it manually with:

$ poetry run python weekly-todo-report.py

QA Tools

Install pre-commit

$ poetry run pre-commit install

Run development tools (including lint, typing, and tests):

# run at the project root, where the noxfile.py is located:
$ poetry run nox
# or just nox if installed globally with pipx for example

Optional: Run individual nox sessions:

$ nox -rs <session name>

For example:

# manual linting
$ nox -rs lint
# manual formatting
$ nox -rs format
# manual tests
$ nox -rs tests

Optional: Environment Auto-Configuration with direnv

To automate the initialization of the required ENV VARs and corresponding python virtual environment with all dependencies installed to ineract with Trello API, you can take of leverage of direnv and manually confmanual igure it to enable poetry virtual env auto-activiton with the following function amanual dded to ~/.direnvrc

For example, for a Debian apt based system:

$ sudo apt install direnv
$ cp .env_example .env
$ vim .env
$ direnv allow

The above setup allows to run within the poetry virtual environment

(trello-reports-L5dNkZrm-py3.9)user@host ~/code/trello-reports: ./weekly-todo-report.py

About

Trello boards reports and analytics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages