-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
38 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
# pb-rozklad | ||
|
||
## Run: | ||
Dockerfile defaults to running the script in a cron-like manner, see docker-compose.yml for an example deployment. | ||
## Setup | ||
Dockerfile defaults to running the script in a cron-like manner, see `docker-compose.yml` for an example deployment. Make sure to set `xx_ENABLED=false` in config.txt if you don't intend to use a particular messaging platform. | ||
|
||
## appstate.json for FB Messenger: | ||
## appstate.json for FB Messenger | ||
https://github.com/shellmage/AAAAAAAAAAAAA/blob/main/getAppstate.js | ||
|
||
Run it in without headless mode, then click the login button manually. | ||
This script is partially broken. Outside container run `npm install puppeteer`, run script above without headless mode, click the login button manually, then move generated appstate.json to `/data` inside container. | ||
|
||
## Testy: | ||
- 404 (brak rozkładu) | ||
- pierwszy rozkład | ||
- powtórka rozkładu | ||
- zmieniony rozkład | ||
## Matrix support | ||
Put https://github.com/fabianonline/matrix.sh/ in `/data`. Run it once inside container using `HOME=/data/matrix.sh /data/matrix.sh/matrix.sh --login` to obtain access token. | ||
|
||
E2EE rooms aren't supported for the time being. | ||
|
||
## Tests | ||
- no schedule (HTTP 404) | ||
- first schedule | ||
- schedule without changes | ||
- schedule with changes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
# workaround for matrix.sh storing config file in ~/.matrix.sh | ||
HOME=/data/matrix.sh | ||
|
||
/data/matrix.sh/matrix.sh --room=$MX_ROOM_ID --send "$MX_MESSAGE" | ||
/data/matrix.sh/matrix.sh --room=$MX_ROOM_ID --file=/data/workdir/current.png --image | ||
if [ $diff_exitcode -eq 1 ]; then /data/matrix.sh/matrix.sh --room=$MX_ROOM_ID --file=/data/workdir/comparison.png --image; fi | ||
/data/matrix.sh/matrix.sh --room=$MX_ROOM_ID --file=/data/workdir/$pdf_nice |