9 print "usage: leave.py <loginbase>"
13 for loginbase in sys.argv[1:]:
14 site = plc.getSites({'login_base': loginbase}, ['person_ids', 'ext_consortium_id'])
16 print "no sites found"
18 person_ids = site[0]['person_ids']
19 persons = plc.getPersons(person_ids, ['email', 'first_name', 'last_name', 'title', 'roles'])
22 for person in persons:
23 if "pi" in person['roles']:
24 name = "%s %s %s (%s)" % (person['title'], person['first_name'], person['last_name'], person['email'])
27 print "no pis at %s" % loginbase
30 date = time.strftime("%Y/%m/%d", time.gmtime(time.time()))
32 print "loginbase : date : name : ext_consortium_id"
33 print "%9s : %10s : %s : %s" % (loginbase, date, name, site[0]['ext_consortium_id'])