BotZ/README.md

96 lines
2.1 KiB
Markdown
Raw Normal View History

2019-01-07 11:16:16 +01:00
Bot_Z
=====
A bot to easen the daily routine with zucchetti virtual badge.
2019-01-14 12:11:17 +01:00
* Free software: GLWTS public licence.
2019-01-07 11:16:16 +01:00
Features
--------
2019-01-14 12:11:17 +01:00
* Login/Logout
2019-01-21 09:32:52 +01:00
* Check in/Check out
2019-08-08 16:05:59 +02:00
* 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).
2019-01-21 09:32:52 +01:00
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](https://github.com/mozilla/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](https://github.com/mozilla/geckodriver/releases/))
* 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.
2019-01-07 11:16:16 +01:00
2019-01-14 12:11:17 +01:00
TODO
----
2019-01-07 11:16:16 +01:00
2019-01-21 15:58:13 +01:00
- [x] Check in/out
- [ ] systemd {unit, timer}
2019-08-08 16:05:59 +02:00
- [x] APIs
2019-01-21 15:58:13 +01:00
- [ ] Mailer