-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSLOGenerator.py
executable file
·40 lines (31 loc) · 1005 Bytes
/
SLOGenerator.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
from bs4 import BeautifulSoup
import glob, os
import mysql.connector
from mysql.connector import errorcode
import slate
import urllib2
import ProgramParser as P
DEBUG = False
programsUrl = "http://www.butte.edu/academicprograms/"
def writeProgramsToFile(programs, file):
f = open(file, 'w')
for course in courses:
f.write('{},{}\n'.format(*course))
f.close()
def main():
#progParser = P.ProgramParser(programsUrl)
#programs = progParser.parseToList()
#print(programs)
#writeProgramsToFile(programs, "programs.csv")
#answer = raw_input("Download course outlines (y/n)? ")
#if answer[0] == "y" or answer[0] == "Y":
# subjectList = createSubjectList(getPage(allSubjectsUrl))
# for subject in subjectList.find_all("option"):
# processSubject(subject['value'])
#courses = processCoursePDFs()
#writeCoursesToFile(courses, 'courses.csv')
#writeCourseOutcomesToFile(courses, 'course_outcomes.csv')
#connectDB()
#closeDB()
if __name__ == "__main__":
main()