You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
485 B
19 lines
485 B
#! /usr/bin/python2
|
|
from search import indexListing
|
|
from textbookExceptions import UnIndexable
|
|
from mcmaster.classes import allCourses
|
|
from search import indexListing, createIndex
|
|
from itertools import imap
|
|
|
|
try:
|
|
print "Trying to create the index if it does not exist already"
|
|
createIndex("oersearch")
|
|
except Exception as e:
|
|
print e
|
|
|
|
print "Downloading course info"
|
|
for c in allCourses():
|
|
try:
|
|
print indexListing(c)
|
|
except UnIndexable as e:
|
|
print e
|
|
|