diff --git a/.gitignore b/.gitignore
index ae0cbbd..d1c41a2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
srv/*
bin/web
+.nfs*
.htaccess
src/config.d
diff --git a/bin/changelog.sh b/bin/changelog.sh
index 27e81c4..dd5be65 100755
--- a/bin/changelog.sh
+++ b/bin/changelog.sh
@@ -1,3 +1,5 @@
+echo "
Recent Changes
"
+echo "This list was generated from the git log for the website. The git repository for this webpage can be accessed from FIXME.
"
echo ""
-git log --pretty=format:'- %s - %aN (%ae) (%cr)
' --abbrev-commit --date=relative
+git log --pretty=format:'- %s - %aN (%ae) (%cr)
' --abbrev-commit --date=relative --no-merges
echo "
"
diff --git a/bin/exec_positions.py b/bin/exec_positions.py
new file mode 100755
index 0000000..7f0f146
--- /dev/null
+++ b/bin/exec_positions.py
@@ -0,0 +1,50 @@
+#!/usr/bin/python
+import ldap, time, operator
+
+#
+# globals
+#
+cscUri = "http://csclub.uwaterloo.ca/xsltproc"
+cscTerms = ["Winter", "Spring", "Fall"]
+cscShortTerms = ['w', 's', 'f']
+cscLdapUri = "ldap://ldap1.csclub.uwaterloo.ca ldap://ldap2.csclub.uwaterloo.ca"
+cscLdap = None
+cscPeopleBase = 'ou=People,dc=csclub,dc=uwaterloo,dc=ca'
+
+def cscLdapConnect():
+ global cscLdap
+ cscLdap = ldap.initialize(cscLdapUri)
+ cscLdap.simple_bind_s("", "")
+
+cscLdapConnect()
+
+def showExec(pretty, short):
+ print "" + pretty + "
"
+ members = cscLdap.search_s(cscPeopleBase, ldap.SCOPE_SUBTREE,
+ '(&(objectClass=member)(position=%s))' % short)
+ if len(members) > 0:
+ (_, user) = members[0]
+ print user['cn'][0]
+ else:
+ print 'Seat Empty'
+ print "
"
+
+print "The Executive
"
+showExec("President", "president")
+showExec("Vice-President", "vice-president")
+showExec("Treasurer", "treasurer")
+showExec("Secretary", "secretary")
+showExec("Systems Administrator", "sysadmin")
+
+print "Other Positions
"
+showExec("Chief Returning Officer", "cro")
+showExec("Office Manager", "offsck")
+showExec("Librarian", "librarian")
+
+print "Past Executive
"
+print "For a partial list of past executives, see the relevent wiki page
"
+
+print "Elections
"
+print "Each term the CSC holds elections to determine the executive council. To find out when and where the next elections will be held, check the homepage and the uw.csc newsgroup.
"
+print "
For details on the election rules, see the constitution."
+print "
"
diff --git a/bin/member_info.py b/bin/member_info.py
new file mode 100755
index 0000000..f285648
--- /dev/null
+++ b/bin/member_info.py
@@ -0,0 +1,43 @@
+#!/usr/bin/python
+import sys, os.path, ldap, time
+uid = os.path.basename(sys.argv[1])
+
+cscUri = "http://csclub.uwaterloo.ca/xsltproc"
+cscTerms = ["Winter", "Spring", "Fall"]
+cscShortTerms = ['w', 's', 'f']
+cscLdapUri = "ldap://ldap1.csclub.uwaterloo.ca ldap://ldap2.csclub.uwaterloo.ca"
+cscLdap = None
+cscPeopleBase = 'ou=People,dc=csclub,dc=uwaterloo,dc=ca'
+
+def cscLdapConnect():
+ global cscLdap
+ cscLdap = ldap.initialize(cscLdapUri)
+ cscLdap.simple_bind_s("", "")
+
+cscLdapConnect()
+curDate = time.strftime('%d-%m-%Y')
+members = cscLdap.search_s(cscPeopleBase, ldap.SCOPE_SUBTREE,
+ '(&(objectClass=member)(uid=%s))' % uid)
+if len(members) == 0:
+ print "No such user " + uid + "
"
+ sys.exit()
+
+(_, user) = members[0]
+
+print "Profile for " + user['cn'][0] + "
"
+
+print ""
+print "
"
+if "position" in user:
+ print "- Executive Position: "
+ for x in user['position']:
+ print x # edge case - could hold multiple positions!
+ print "
"
+print "- Terms: "
+for t in sorted(user['term']):
+ print t + " "
+print "
"
+print "- Website: http://csclub.uwaterloo.ca/~" + uid + "
"
+print "
"
+print ""
+
diff --git a/bin/members.py b/bin/members.py
new file mode 100755
index 0000000..5b949a3
--- /dev/null
+++ b/bin/members.py
@@ -0,0 +1,42 @@
+#!/usr/bin/python
+import ldap, time, operator
+
+#
+# globals
+#
+cscUri = "http://csclub.uwaterloo.ca/xsltproc"
+cscTerms = ["Winter", "Spring", "Fall"]
+cscShortTerms = ['w', 's', 'f']
+cscLdapUri = "ldap://ldap1.csclub.uwaterloo.ca ldap://ldap2.csclub.uwaterloo.ca"
+cscLdap = None
+cscPeopleBase = 'ou=People,dc=csclub,dc=uwaterloo,dc=ca'
+
+def cscLdapConnect():
+ global cscLdap
+ cscLdap = ldap.initialize(cscLdapUri)
+ cscLdap.simple_bind_s("", "")
+
+cscLdapConnect()
+curDate = time.strftime('%d-%m-%Y')
+year = time.localtime().tm_year
+term = cscShortTerms[int(time.localtime().tm_mon - 1) / 4]
+term2 = cscTerms[int(time.localtime().tm_mon - 1) / 4]
+members = cscLdap.search_s(cscPeopleBase, ldap.SCOPE_SUBTREE,
+ '(&(objectClass=member)(term=%s%d))' % (term, year))
+members.sort(key=lambda (_, y): y['cn'][0])
+print "Members This Term
"
+print "The members for " + term2 + " " + str(year) + " are listed here. We currently have " + str(len(members)) + " members.
"
+print "Use of this list for solicitation of any form is prohibited. If you wish to get in touch with the membership as a whole please contact the Executive.
"
+print ""
+print ""
+print " Name | Program | Username | "
+for (_, member) in members:
+ if not 'program' in member:
+ member['program'] = ['']
+ print "
"
+ print " " + member['cn'][0] + " | "
+ print " " + member['program'][0] + " | "
+ print " " + member['uid'][0] + " | "
+ print "
"
+print "
"
+print ""
diff --git a/src/web.d b/src/web.d
index 814cb3f..efc7040 100755
--- a/src/web.d
+++ b/src/web.d
@@ -67,6 +67,13 @@ void do_header() {
html_push("