_
This commit is contained in:
parent
3eea1693c4
commit
47d06204ea
7
UI/objects/Rect.py
Normal file
7
UI/objects/Rect.py
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
from numpy import array as a
|
||||||
|
import numpy as np
|
||||||
|
|
||||||
|
|
||||||
|
class Rect:
|
||||||
|
def __init__(self):
|
||||||
|
pass
|
17
UI/objects/Screen.py
Normal file
17
UI/objects/Screen.py
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
from numpy import array as a
|
||||||
|
import numpy as np
|
||||||
|
import pygame
|
||||||
|
|
||||||
|
|
||||||
|
class Screen:
|
||||||
|
def __init__(self, width: float, height: float, font_size: int, matrix: np.array):
|
||||||
|
self.width = width
|
||||||
|
self.height = height
|
||||||
|
self.size = a([width, height])
|
||||||
|
self.matrix = matrix
|
||||||
|
|
||||||
|
self.s = pygame.Surface([width, height])
|
||||||
|
|
||||||
|
self.font_size = font_size
|
||||||
|
|
||||||
|
self.center = a([width, height]) / 2
|
19
main.py
19
main.py
@ -1,11 +1,26 @@
|
|||||||
import json
|
from multiprocessing import Process
|
||||||
|
from multiprocessing import Queue
|
||||||
import time
|
import time
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
test_lenght_substitution = 7
|
test_lenght_substitution = 7
|
||||||
url_school = "https://spspb.edupage.org/"
|
url_school = "https://spspb.edupage.org/"
|
||||||
account = {"username": "login", "password": "pass"}
|
account = {"username": "login", "password": "pass"}
|
||||||
|
|
||||||
|
|
||||||
|
def run_in_parallel(edu, vision):
|
||||||
|
q = Queue()
|
||||||
|
|
||||||
|
p0 = Process(target=edu.run, args=(q,))
|
||||||
|
p1 = Process(target=vision.run, args=(q,))
|
||||||
|
|
||||||
|
p0.run()
|
||||||
|
p1.run()
|
||||||
|
|
||||||
|
p0.join()
|
||||||
|
p1.join()
|
||||||
|
|
||||||
|
|
||||||
def get_substitutions():
|
def get_substitutions():
|
||||||
substitutions = edupage.post(url_school + "substitution/server/viewer.js?__func=getSubstViewerDayDataHtml",
|
substitutions = edupage.post(url_school + "substitution/server/viewer.js?__func=getSubstViewerDayDataHtml",
|
||||||
data='{"__args":[null,{"date":"2021-06-22","mode":"classes"}],"__gsh": "' + gsh + '"}')
|
data='{"__args":[null,{"date":"2021-06-22","mode":"classes"}],"__gsh": "' + gsh + '"}')
|
||||||
@ -34,7 +49,7 @@ def get_substitutions():
|
|||||||
if line == '<img src="/global/pics/ui/absent_32.svg" style="height:16px;display:inline-block;vertical-align:text-bottom;margin-right:5px"/>Chýba':
|
if line == '<img src="/global/pics/ui/absent_32.svg" style="height:16px;display:inline-block;vertical-align:text-bottom;margin-right:5px"/>Chýba':
|
||||||
list_triedy[trieda][list_parsed[position - 1]] = "Chýba"
|
list_triedy[trieda][list_parsed[position - 1]] = "Chýba"
|
||||||
else:
|
else:
|
||||||
list_triedy[trieda][list_parsed[position-1]] = line
|
list_triedy[trieda][list_parsed[position - 1]] = line
|
||||||
list_triedy["chybajuci"] = chybajuci_uc
|
list_triedy["chybajuci"] = chybajuci_uc
|
||||||
return list_triedy
|
return list_triedy
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user