Skip to content

Commit

Permalink
Merge pull request #24 from Jacrac04/develop
Browse files Browse the repository at this point in the history
v4.1.2
  • Loading branch information
Jacrac04 authored Sep 2, 2021
2 parents 44fc9f9 + ce278dc commit defbe95
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ServerStatus/status.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v4.1.1, Normal, None
v4.1.2, Normal, None
17 changes: 16 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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)



Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/parser_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit defbe95

Please sign in to comment.