break ins_schoolyears = "INSERT INTO timetable(ID, Date, Time, Subject, Class, Room, Substitution) " \ "VALUES(%d,'%s','%s','%s','%s','%s','%s');" % (counter, splitted[0], splitted[1],splitted[2],splitted[3],splitted[4], "No") execute(ins_schoolyears) # # Program Sequence # create_database() # create table for Mr. Hager create_t_timetable="CREATE TABLE IF NOT EXISTS timetable(" \ "ID INTEGER PRIMARY KEY AUTOINCREMENT," \ "Date VARCHAR(20) NOT NULL," \ "Time VARCHAR(10) NOT NULL," \ "Subject VARCHAR(10) NOT NULL," \ "Class VARCHAR(10) NOT NULL," \ "Room VARCHAR(10) NOT NULL," \ "Substitution VARCHAR(10) NOT NULL);" \ # create table inside our database execute(create_t_timetable) # Fill DB. fill_database() # Close all sessions. CONNECTION.commit() CONNECTION.close() WebUntis_Session.close_session(WEBUNTIS_SESSION)
__version__ = "1.0.1" __email__ = "*****@*****.**" __status__ = "Finished" """ # # Here is a collection of query-methods, mostly used for database creation. # from datetime import date import webuntis import datetime import WebUntis_Session # session-setup [ID fuer 5DN: 365, 1AI: 350] session = WebUntis_Session.open_session() def logout(): """ logout(): closes the session. """ session.logout() def getSession(): """ getSession(): returns current session-object. """ return session def printDepartments(): """
ins_schoolyears = "INSERT INTO timetable(ID, Date, Time, Subject, Class, Room, Substitution) " \ "VALUES(%d,'%s','%s','%s','%s','%s','%s');" % (counter, splitted[0], splitted[1],splitted[2],splitted[3],splitted[4], "No") execute(ins_schoolyears) # # Program Sequence # create_database() # create table for Mr. Hager create_t_timetable="CREATE TABLE IF NOT EXISTS timetable(" \ "ID INTEGER PRIMARY KEY AUTOINCREMENT," \ "Date VARCHAR(20) NOT NULL," \ "Time VARCHAR(10) NOT NULL," \ "Subject VARCHAR(10) NOT NULL," \ "Class VARCHAR(10) NOT NULL," \ "Room VARCHAR(10) NOT NULL," \ "Substitution VARCHAR(10) NOT NULL);" \ # create table inside our database execute(create_t_timetable) # Fill DB. fill_database() # Close all sessions. CONNECTION.commit() CONNECTION.close() WebUntis_Session.close_session(WEBUNTIS_SESSION)
__version__ = "1.0.1" __email__ = "*****@*****.**" __status__ = "Finished" """ # # Here is a collection of query-methods, mostly used for database creation. # from datetime import date import webuntis import datetime import WebUntis_Session # session-setup [ID fuer 5DN: 365, 1AI: 350] session = WebUntis_Session.open_session() def logout(): """ logout(): closes the session. """ session.logout() def getSession(): """ getSession(): returns current session-object. """ return session
__version__ = "1.0.1" __email__ = "*****@*****.**" __status__ = "no status, just a test file." """ # # This is just a testing-file and is not a relevant script of our diploma project. # import WebUntis_Session import WebUntisData import datetime import json import re session = WebUntis_Session.open_session() id = 365 #WebUntisData.printClasses() #printDepartments() #printRooms() #printSubjects() print(WebUntisData.getTeacherID("BRE")) #printSchoolyears() #printSubstitutions() #printTimetable(id) #print(getSubstitutions()) #print(WebUntisData.getClasses()) #WebUntisData.printAllSubstitutions() #x = WebUntisData.getSubstitutionForSpecificTeacher("KOR")