diff --git a/Makefile b/Makefile index f4fe988..ffe7e04 100644 --- a/Makefile +++ b/Makefile @@ -21,8 +21,8 @@ clean: install: $(MAKE) clean; $(MAKE); - rm -rf ${SRV_ROOT}build/; - cp -rT ./build ${SRV_ROOT}build/; + rm -rf /srv/http/build/; + cp -rT ./build /srv/http/build/; cp -rT ./build/scripts/ ${SRV_ROOT}scripts/; cp -rT ./build/styles/ ${SRV_ROOT}styles/; - cp search.ini ${SRV_ROOT}build/; + cp search.ini /srv/http/build/; diff --git a/src/goasearch.py b/src/goasearch.py index b661f87..a0852fc 100755 --- a/src/goasearch.py +++ b/src/goasearch.py @@ -1,7 +1,8 @@ #! /usr/bin/python2 from search import indexListing from textbookExceptions import UnIndexable -from mcmaster.classes import allCourses, classToJSON, indexListing +from mcmaster.classes import allCourses +from search import indexListing, createIndex from itertools import imap try: @@ -11,7 +12,7 @@ except Exception as e: print e print "Downloading course info" -for c in imap(classToJSON, allCourses()): +for c in allCourses(): try: print indexListing(c) except UnIndexable as e: diff --git a/src/mcmaster/classes.py b/src/mcmaster/classes.py index 2103c30..d6d2ca6 100755 --- a/src/mcmaster/classes.py +++ b/src/mcmaster/classes.py @@ -118,10 +118,19 @@ class Section(dict): self.time = time.encode("UTF-8") self.loc = loc.encode("UTF-8") self.prof = prof.encode("UTF-8") - self.sem = sem.encode("UTF-8") + self._sem = sem.encode("UTF-8") self._date = False self._day = False + @property + def sem(self): + if self._sem == fall: + return "Fall" + elif self._sem == winter: + return "Winter" + else: + return "Spring/Summer" + @property def date(self): if self.time != "TBA": @@ -341,7 +350,7 @@ def getCourses(semester, threadcount=10): def allCourses(): return chain.from_iterable( - (getCourses(sem, threadcount=10) + (getCourses(sem, threadcount=25) for sem in (fall, winter, spring_summer))) if __name__ == "__main__": diff --git a/src/scripts/book.tag b/src/scripts/book.tag index 5a987c4..8565193 100644 --- a/src/scripts/book.tag +++ b/src/scripts/book.tag @@ -23,7 +23,7 @@
-+
Couldn't find anything, sorry :(
diff --git a/src/scripts/class.tag b/src/scripts/class.tag index cf4e64c..f428c4d 100644 --- a/src/scripts/class.tag +++ b/src/scripts/class.tag @@ -21,8 +21,8 @@No books at this time
-Check back later, or verify the course has books
+No books at this time
+Check back later, or verify the course has books