This repository has been archived by the owner on Sep 28, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: Telegram Integration; Config Validation
- Loading branch information
Showing
16 changed files
with
186 additions
and
44 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
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,2 +1,3 @@ | ||
pip3 install -r requirements.txt | ||
#!/bin/bash | ||
pip3 install -q -r requirements.txt | ||
python3 src/impfbot.py |
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,3 @@ | ||
#!/bin/bash | ||
pip3 install -q -r requirements.txt | ||
python3 src/validate_config.py |
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,3 @@ | ||
#!/bin/bash | ||
pip3 install -q -r requirements.txt | ||
python3 src/impfbot.py |
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,3 @@ | ||
#!/bin/bash | ||
pip3 install -q -r requirements.txt | ||
python3 src/validate_config.py |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,38 @@ | ||
import argparse | ||
from log import log | ||
from alerts import alert | ||
|
||
|
||
parser = argparse.ArgumentParser() | ||
parser.add_argument('-a', '--alert', default=False, action='store_true', | ||
help='validate alert with a test message. Default=False') | ||
arg = parser.parse_args() | ||
|
||
log.info(f"validate config.ini") | ||
|
||
import settings | ||
|
||
log.info(f"settings validation finished") | ||
|
||
result = None | ||
if arg.alert: | ||
result = "yes" | ||
else: | ||
print("Do you want to send a test message? yes/no") | ||
result = input() | ||
while True: | ||
if result in ["yes", "y", "ja", "j"]: | ||
alert("Test", verbose=True) | ||
log.info(f"Finished: Sending test massages") | ||
break | ||
elif result in ["no", "n", "nein"]: | ||
break | ||
else: | ||
print("Invalid input") | ||
print("Do you want to send a test message? yes/no") | ||
result = input() | ||
|
||
log.info(f"finished validation script") | ||
|
||
if not arg.alert: | ||
input() |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,2 +1,2 @@ | ||
py -3 -m pip install -r requirements.txt | ||
py -3 -m pip install -q -r requirements.txt | ||
py -3 src/impfbot.py |
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,2 @@ | ||
py -3 -m pip install -q -r requirements.txt | ||
py -3 src/validate_config.py |