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)
# 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")

#print(WebUntisData.printSubstitutionForSpecificTeacher("KOR"))
#WebUntisData.printAllSubstitutions()
#WebUntisData.checkForSubstitutions()

WebUntis_Session.close_session(session)
Exemple #3
0
        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)
# 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")

#print(WebUntisData.printSubstitutionForSpecificTeacher("KOR"))
#WebUntisData.printAllSubstitutions()
#WebUntisData.checkForSubstitutions()

WebUntis_Session.close_session(session)