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 "" 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 "

" +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 " " +for (_, member) in members: + if not 'program' in member: + member['program'] = [''] + print " " + print " " + print " " + print " " + print " " +print "
NameProgramUsername
" + member['cn'][0] + "" + member['program'][0] + "" + member['uid'][0] + "
" +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("
"); html_push("
"); + html("wiki"); + html("git"); + html("mirror"); + html("stats"); + html("webmail"); + html("newsgroups"); + html("mailman"); html_pop("
"); html_push("
"); @@ -77,7 +84,7 @@ void do_header() { html_push("
"); html_push("

"); - html("" ~ site_title ~ " " ~ site_subtitle ~ ""); + html(" " ~ site_subtitle ~ ""); html_pop("

"); html_pop("
"); diff --git a/srv/About/Constitution/index.md b/srv/About/Constitution/index.md index a6c011d..f00acd2 100644 --- a/srv/About/Constitution/index.md +++ b/srv/About/Constitution/index.md @@ -1,4 +1,4 @@ -

1.

+

1. Name

The name of this organization shall be the "Computer Science Club of the University of Waterloo". diff --git a/srv/About/Members/index.md b/srv/About/Members/index.md new file mode 100644 index 0000000..9daeafb --- /dev/null +++ b/srv/About/Members/index.md @@ -0,0 +1 @@ +test diff --git a/srv/About/index.md b/srv/About/index.md new file mode 100644 index 0000000..500f383 --- /dev/null +++ b/srv/About/index.md @@ -0,0 +1,18 @@ +## About the Office + +The CSC Office is located at room MC3036/3037, in the Math & Computer Building of the University of Waterloo. The office is open whenever office staff are around to keep it open, which basically means it is open most of the time. You can check by taking a look through our [web-enabled camera](../Webcams). At the office we have lots of books, a few computer terminals, and most of the time an array of knowledgeable people to talk to and ask questions. + +One of our most popular services at the office is providing anybody with free CD/DVD copies of Free Software and Open Source operating system distributions. + +Another favourite is our $0.50 pop for members. We have a fridge in the office which is at most times stocked with many different kinds of pop cans. + +We can always use good office staff, so if you're interested in helping out, just come by the office and chat to somebody there, and the office manager will probably give you something to do. + +Our office phone number is (519) 888-4567 x33870, and you can mail us at the following address. + + Computer Science Club + Math & Computer 3036/3037 + University of Waterloo + 200 University Avenue West + Waterloo, ON N2L 3G1 + Canada diff --git a/srv/Events/index.md b/srv/Events/index.md new file mode 100644 index 0000000..d043da0 --- /dev/null +++ b/srv/Events/index.md @@ -0,0 +1 @@ +Events diff --git a/srv/Library.md b/srv/Library.md new file mode 100644 index 0000000..dea0d9a --- /dev/null +++ b/srv/Library.md @@ -0,0 +1,7 @@ +rofl!!! + +list + +* cats +* web servers +* seaweed diff --git a/srv/Webcams.md b/srv/Webcams.md new file mode 100644 index 0000000..4f1dc9e --- /dev/null +++ b/srv/Webcams.md @@ -0,0 +1,15 @@ +Webcams +====== +Spy on the office, see whether it's open or who is passing by the door! + +Maltodextrin +----- +
+ +
+ +Bit-Shifter +----- +
+ +