Пример #1
0
def available_cube_names(cwcfg):
    """Return a list of available cube names, with 'cubicweb_' prefix dropped.
    """
    def drop_prefix(cube):
        prefix = 'cubicweb_'
        if cube.startswith(prefix):
            cube = cube[len(prefix):]
        return cube

    return [drop_prefix(cube) for cube in cwcfg.available_cubes()]
Пример #2
0
 def run(self, args):
     """run the command with its specific arguments"""
     for cube in cwcfg.available_cubes():
         print(cube)