Fuck Zucchetti!
Go to file
blallo baa70bd05f
Bump version: 1.1.2 → 1.1.3
2019-09-26 15:06:16 +02:00
api Manage session properly. 2019-09-25 18:08:44 +02:00
bot.z_web [remove] package-lock.json from repo 2019-09-04 15:04:17 +02:00
bot_z Bump version: 1.1.2 → 1.1.3 2019-09-26 15:06:16 +02:00
docs setup.py 2019-09-04 14:42:22 +02:00
tests Blacken'd 2019-09-04 14:56:36 +02:00
.dockerignore dockerignoring Makefile. 2019-09-05 20:33:12 +02:00
.editorconfig Init 2019-01-07 11:16:16 +01:00
.gitignore Update gitignore. 2019-09-04 15:01:48 +02:00
.pylintrc Pylint configuration. 2019-09-04 14:58:34 +02:00
.travis.yml Init 2019-01-07 11:16:16 +01:00
Dockerfile Bump version: 1.1.2 → 1.1.3 2019-09-26 15:06:16 +02:00
LICENSE login/logout mostly working. 2019-09-04 14:43:24 +02:00
MANIFEST.in Cleanup 2019-09-04 14:46:56 +02:00
Makefile Bump version: 1.1.2 → 1.1.3 2019-09-26 15:06:16 +02:00
README.md Updated README. 2019-09-04 15:04:29 +02:00
entrypoint.sh Change entrypoint of dockerfile. 2019-09-04 15:05:21 +02:00
requirements_build.txt Cleanup 2019-09-04 14:46:56 +02:00
setup.cfg Bump version: 1.1.2 → 1.1.3 2019-09-26 15:06:16 +02:00
setup.py Bump version: 1.1.2 → 1.1.3 2019-09-26 15:06:16 +02:00
tox.ini Init 2019-01-07 11:16:16 +01:00

README.md

Bot_Z

A bot to easen the daily routine with zucchetti virtual badge.

  • Free software: GLWTS public licence.

Features

  • Login/Logout
  • Check in/Check out
  • web ui

Develop

To allow local development you either need a configuration file named .botz.yaml in the root of the project with something like this:

---
base_uri: "<your_target_uri>"
debug: true
headless: true
log:
  level: DEBUG
  syslog: false
http:
  bind_addr:
    - "127.0.0.1"
  port: 3003
  cookie_secure: false
  cors_allow: "http://localhost:3000"

Read the docstring in api/conf.py to understand the menaning of the various parameters.

Do not pip install -e .. It will miss the geckodriver download step. Take a look at the provided Dockerfile.

You can either run it:

$ docker build -t botz:latest .
$ docker run -v $PWD:/app -p "3003:3003" botz

and find a working app at http://localhost:3003. Or you can python setup.py bdist_wheel && python setup.py develop. You will need:

  • python >= 3.7
  • yarn (npm support coming soon...)

If you want to develop the ui, you can also serve it via yarn (as it supports hot reload):

$ cd bot.z_web
$ yarn start

You will find a working ui at localhost:3000 (but you need the last two lines of the previous example config file).

Install

Either clone this repo and pip install . or use one of the provided packages. Pay attention: this package needs a working binary of geckodriver. You can either proceed in one of the following ways:

  • Install the source distribution and put in your $PATH the geckodriver binary (that can be downloaded here)
  • Install the wheel for your architecture
  • pip install . or pip install -e . will download the latest geckodriver and put it in a path where the code will be able to find it.

BEWARE: the code gives precedence to the geckodriver in $PATH over that donwloaded.

TODO

  • Check in/out
  • systemd {unit, timer}
  • APIs
  • Mailer