diff --git a/bin/exec_positions.py b/bin/exec_positions.py new file mode 100755 index 0000000..2c7489b --- /dev/null +++ b/bin/exec_positions.py @@ -0,0 +1,47 @@ +#!/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 "
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 index 72e8274..f285648 100755 --- a/bin/member_info.py +++ b/bin/member_info.py @@ -28,6 +28,11 @@ print "" 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.