@@ -0,0 +1,826 @@
+#!/usr/bin/env python3%0A# -*- coding: utf-8 -*-%0A%0Aimport sys%0Aimport monco%0A%0A%0Adef info(event, key):%0A    tickets = event%5B'tickets'%5D%0A    data = %7B%7D%0A    for ticket in tickets:%0A        if ticket.get('cancelled'):%0A            continue%0A        value = ticket.get(key)%0A        email = ticket.get('email')%0A        if not (value and email):%0A            continue%0A        data.setdefault(value, %5B%5D).append(email)%0A    for key, value in data.items():%0A        if len(value) %3C 2:%0A            continue%0A        print('%25s : %25s' %25 (key, ', '.join(value)))%0A    print('')%0A%0A%0Adef run():%0A    try:%0A        db = monco.Monco(dbName='eventman')%0A        events = db.query('events', %7B'title': sys.argv%5B1%5D%7D)%0A        info(events%5B0%5D, sys.argv%5B2%5D)%0A    except:%0A        print('count.py %22title of event%22 key')%0A        sys.exit(1)%0A%0Aif __name__ == '__main__':%0A    run()%0A

check for duplicate entries