Skip to content

Commit

Permalink
📝 Add readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
cristiancolosimo committed Oct 15, 2023
1 parent e56b572 commit b47f9b8
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
POLLING_INTERVAL=60
HISTORY_INTERVAL=125
GET_LAB_STATE_ENDPOINT=http://presence.hlcs.it/gates/internal/
GET_LAB_HISTORY_ENDPOINT=http://presence.hlcs.it/requests/internal/
RUST_LOG=trace
RUST_LOG=info
CHRONO_TIME_OFFSET="+02:00"
TELOXIDE_TOKEN="6039572435:AAHg8t2WF94y4-j-Rik-YDA4yBKERHEwt4w"
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
POLLING_INTERVAL=60
HISTORY_INTERVAL=125
GET_LAB_STATE_ENDPOINT=
GET_LAB_HISTORY_ENDPOINT=
RUST_LOG=info
CHRONO_TIME_OFFSET="+02:00"
TELOXIDE_TOKEN=""
22 changes: 22 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Presence Telegram Bot (RS version)
===
A Bot telegram for checking the status of door of the hacklab


For use it copy the file .env.example to .env

and set the .env vars:

- TELOXIDE_TOKEN , API tokey generated by the @BotFather

- POLLING_INTERVAL default 60 seconds

- HISTORY_INTERVAL default 125 seconds

- GET_LAB_STATE_ENDPOINT, the endpoint for get the state of the lab

- GET_LAB_HISTORY_ENDPOINT, the endpoint for get the history of opens of the lab

- RUST_LOG=info, the log level of the bot (trace, debug, info, warn, error)
- CHRONO_TIME_OFFSET="+02:00", the offset of the time zone of the lab, default +02:00 (Italy, Rome), for other time zone see https://docs.rs/chrono/latest/chrono/offset/struct.FixedOffset.html
and for start it run the command docker-compose up -d

0 comments on commit b47f9b8

Please sign in to comment.