From 8ae6fdc60b0780576d8269535b1925fc28e94c11 Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 30 Jun 2022 19:22:54 +0200 Subject: [PATCH] added readme --- env.sample | 4 ++++ main.py | 3 +-- readme.md | 14 ++++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 env.sample create mode 100644 readme.md diff --git a/env.sample b/env.sample new file mode 100644 index 0000000..f3c2ef6 --- /dev/null +++ b/env.sample @@ -0,0 +1,4 @@ +browserDebug = "false" +schoolUrl = "your url" +username = "your username" +password = "your password" \ No newline at end of file diff --git a/main.py b/main.py index 95587b2..306b7f8 100755 --- a/main.py +++ b/main.py @@ -141,11 +141,10 @@ class Bot: if len(next_school_day) > 0: 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() - print(txt) os.popen(txt) time.sleep(5) diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..05cb678 --- /dev/null +++ b/readme.md @@ -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` \ No newline at end of file