added readme

master
alex 2022-06-30 19:22:54 +02:00
parent b9b69f6130
commit 8ae6fdc60b
3 changed files with 19 additions and 2 deletions

4
env.sample Normal file
View File

@ -0,0 +1,4 @@
browserDebug = "false"
schoolUrl = "your url"
username = "your username"
password = "your password"

View File

@ -141,11 +141,10 @@ class Bot:
if len(next_school_day) > 0: if len(next_school_day) > 0:
nextDayEncodedBytes = base64.b64encode(json.dumps(next_school_day).encode("utf-8")) nextDayEncodedBytes = base64.b64encode(json.dumps(next_school_day).encode("utf-8"))
txt = "../go-chat-bot/main {} {}".format(str(todayEncodedBytes, "utf-8"), str(nextDayEncodedBytes, "utf-8")) txt = "../school-portal-substitution-plan-matrix-chat-bot/main {} {}".format(str(todayEncodedBytes, "utf-8"), str(nextDayEncodedBytes, "utf-8"))
self.driver.close() self.driver.close()
print(txt)
os.popen(txt) os.popen(txt)
time.sleep(5) time.sleep(5)

14
readme.md Normal file
View File

@ -0,0 +1,14 @@
# Browser automatisation for School portal substitution plan
1. Change `env.sampe` to `.env`
2. Fill **.env** with your **credentials**
3. Install the necessary Chromedriver from here https://chromedriver.chromium.org/downloads
4. Place the Chromedriver in this folder under the name `chromedriver`
## Important
Make sure you have put both projects in the same main folder so everything works
**For example**:\
Main folder: `school-portal-substitution-plan`\
Browser folder: `school-portal-substitution-plan\school-portal-substitution-plan-browser`\
Chat folder: `school-portal-substitution-plan-matrix-chat-bot`