From 7049a08311f7eb0c331b7afba81cd4c2ffc8a06f Mon Sep 17 00:00:00 2001 From: Jacrac04 <62761393+Jacrac04@users.noreply.github.com> Date: Mon, 21 Jun 2021 13:41:59 +0100 Subject: [PATCH 1/4] Add timestableBot window --- main.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/main.py b/main.py index f76526d..af5cab7 100644 --- a/main.py +++ b/main.py @@ -119,12 +119,22 @@ def __init__(self, master): self.btn_taskGen = Button(self, text="Task Generator", command=self.openTaskGenerator) self.btn_taskGen.grid(column=1, row=1, padx=10, pady=10) + self.btn_taskGen = Button(self, text="Timestable Bot", command=self.openTimestableBot) + self.btn_taskGen.grid(column=2, row=1, padx=10, pady=10) + def openTaskGenerator(self): self.taskGeneratorWindow= Toplevel(self.master) self.gf = TaskGeneratorFrame(self.taskGeneratorWindow, self.master) self.gf.grid(column=0, row=1, columnspan=2, padx=10, pady=10) self.btn_taskGenClose = Button(self.taskGeneratorWindow, text="Close", command=self.taskGeneratorWindow.destroy) self.btn_taskGenClose.grid(column=0, row=2, columnspan=2, padx=10, pady=10) + + def openTimestableBot(self): + self.timestableBotWindow= Toplevel(self.master) + self.gf = TimestableBotFrame(self.timestableBotWindow, self.master) + self.gf.grid(column=0, row=1, columnspan=2, padx=10, pady=10) + self.btn_taskGenClose = Button(self.timestableBotWindow, text="Close", command=self.timestableBotWindow.destroy) + self.btn_taskGenClose.grid(column=0, row=2, columnspan=2, padx=10, pady=10) @@ -273,6 +283,11 @@ def _start_btn_clicked(self, ): tkm.showerror("Input error", "Invalid totalQnum or Delay") +class TimestableBotFrame(LabelFrame): + def __init__(self, master, masterMaster): + super().__init__(master) + + class TaskGeneratorFrame(LabelFrame): def __init__(self, master, masterMaster): super().__init__(master) From aaaeb16d2bbbc49949054bd925bff9b0b8043184 Mon Sep 17 00:00:00 2001 From: Jacrac04 <62761393+Jacrac04@users.noreply.github.com> Date: Mon, 21 Jun 2021 14:07:19 +0100 Subject: [PATCH 2/4] Merge branch 'hotfix_updateVersion' --- README.md | 1 + ServerStatus/status.txt | 2 +- main.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b6acac3..f0de081 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,7 @@ New Features: - Warnings - If you try to do something known to get you banned, it will warn you. - Task Generator - Generate Question lists - Update Checker - This can be disabled by changing `ENABLE_STATUS_CHECK = True` to `ENABLE_STATUS_CHECK = False` in `main.py` +- TimesTable Bot (Experimental) - Use this to get onto the timestable leaderboards! Other Changes: - Changed file layout diff --git a/ServerStatus/status.txt b/ServerStatus/status.txt index 00eb019..fd1dd80 100644 --- a/ServerStatus/status.txt +++ b/ServerStatus/status.txt @@ -1 +1 @@ -v4.1.0, Normal, None \ No newline at end of file +v4.1.1, Normal, None \ No newline at end of file diff --git a/main.py b/main.py index af5cab7..40b824c 100644 --- a/main.py +++ b/main.py @@ -15,7 +15,7 @@ from ServerStatus.server_check import check_status -CURRENT_VERSION = 'v4.1.0' +CURRENT_VERSION = 'v4.1.1' ENABLE_STATUS_CHECK = True From 246d095e4608af47272b10184eab825ed78f60b2 Mon Sep 17 00:00:00 2001 From: Jacrac04 <62761393+Jacrac04@users.noreply.github.com> Date: Thu, 2 Sep 2021 19:08:13 +0100 Subject: [PATCH 3/4] Fix Issues Had to chenge where it finds the script with the data. --- src/parser_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parser_utils.py b/src/parser_utils.py index d58b945..f0bcc98 100644 --- a/src/parser_utils.py +++ b/src/parser_utils.py @@ -21,8 +21,8 @@ class Parser: @staticmethod def parse_V2(page: str): try: - - current_question_script = str(Parser.find_tags(page)[-4]) + #Upgrade so it allows for changes to the question page + current_question_script = str(Parser.find_tags(page)[-2]) _json = list(Parser.extract_json(current_question_script))[0] try: From c268e367f1481d83e5c4158ead8f058d471d4cae Mon Sep 17 00:00:00 2001 From: Jacrac04 <62761393+Jacrac04@users.noreply.github.com> Date: Thu, 2 Sep 2021 19:13:16 +0100 Subject: [PATCH 4/4] Update Status --- ServerStatus/status.txt | 2 +- main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ServerStatus/status.txt b/ServerStatus/status.txt index fd1dd80..916cd46 100644 --- a/ServerStatus/status.txt +++ b/ServerStatus/status.txt @@ -1 +1 @@ -v4.1.1, Normal, None \ No newline at end of file +v4.1.2, Normal, None \ No newline at end of file diff --git a/main.py b/main.py index 40b824c..a75e815 100644 --- a/main.py +++ b/main.py @@ -15,7 +15,7 @@ from ServerStatus.server_check import check_status -CURRENT_VERSION = 'v4.1.1' +CURRENT_VERSION = 'v4.1.2' ENABLE_STATUS_CHECK = True