def committees()

in scripts/committee_info.py [0:0]


def committees():

    cttees = {}
    cttes = cidata['committees']
    for ent in cttes:
        ctte = cttes[ent]
        c = {}
        for key in ctte:
            # some keys need special processing
            if key == 'display_name':
                basename = ctte['display_name']
                c['fullname'] = "Apache %s" % ('mod_perl' if basename == 'Perl' else basename)
            elif key == 'chair':
                c['chair'] = None
                for ch in ctte['chair']:
                    c['chair'] = {
                    'nick': ch,
                    'name': ctte['chair'][ch]['name']}
            elif key == 'established':
                value = ctte[key]
                if value:
                    value = "%s-%s" % (value[3:7], value[0:2]) # extract year and month
                c[key] = value
            elif key == 'report':
                c[key] = ctte[key] # save original values
                value = ctte[key]
                if 'January' in value:
                    c['reporting'] = 1
                elif 'February' in value:
                    c['reporting'] = 2
                elif 'March' in value:
                    c['reporting'] = 3
                elif 'Every month' in value:
                    c['reporting'] = 0
            else:
                c[key] = ctte[key]
        cttees[ent]=c
    return cttees