'List available modules with a brief description (the first description line)'

def do_list_modules(self, arg):

    system = ''
    if self.default_filter:
        system = self.pupsrv.get_clients(self.default_filter)[0].desc['platform'].lower()
        self.display_success(('List    modules    compatible    with    the    selected    host:    %s' % system))
    else:
        self.display_success('List    all    modules')
    for mod in sorted([x for x in self.pupsrv.iter_modules()], key=(lambda x: x.category)):
        if mod.is_module:
            if ((self.default_filter and ((system in mod.compatible_systems) or (not mod.compatible_systems))) or (not self.default_filter)):
                if mod.__doc__:
                    doc = mod.__doc__.strip()
                else:
                    doc = ''
                self.stdout.write('{:<25}                {}\n'.format(('%s/%s' % (mod.category, mod.get_name())), color(doc.title().split('\n', 1)[0], 'grey')))
