Remove ceoquery

Just use the GUI's search feature or ldapsearch directly.
master
Michael Spang 15 years ago
parent ba05827977
commit 06d1e8b48b
  1. 57
      bin/ceoquery
  2. 2
      setup.py

@ -1,57 +0,0 @@
#!/usr/bin/python
"""
ceoquery - a script to lookup member and account information
"""
import os, sys
from ceo import members, terms
try:
members.connect()
except Exception, e:
print "ceoquery: %s" % e
sys.exit(1)
def usage():
print "Usage: ceoquery memberlist|termusers"
if len(sys.argv) < 2:
usage()
elif sys.argv[1] == 'memberlist':
current_term = terms.current()
members = members.list_term(current_term)
for member in members.values():
if 'program' in member:
program = member['program'][0]
else:
program = ''
print "%s|%s|%s" % (member['cn'][0], program, member['uid'][0])
elif sys.argv[1] == 'allmembers':
pass
elif sys.argv[1] == 'booklist':
pass
elif sys.argv[1] == 'allusers':
pass
elif sys.argv[1] == 'termusers':
if len(sys.argv) > 2:
term = sys.argv[2]
else:
term = terms.current()
members = members.list_term(term)
for member in members:
print member
else:
usage()

@ -6,6 +6,6 @@ setup(
name='ceo',
description='CSC Electronic Office',
packages=[ 'ceo', 'ceo.urwid' ],
scripts=['bin/ceo', 'bin/ceoquery' ],
scripts=['bin/ceo'],
)

Loading…
Cancel
Save