@cli.command('content-file-info', short_help='Provides information for '
             'a set of lektor files.')
@click.option('as_json', '--json', is_flag=True,
              help='Prints out the data as json.')
@click.argument('files', nargs=-1, type=click.Path())
@pass_context
def content_file_info_cmd(ctx, files, as_json):
    project = None

    def fail(msg):
        if as_json:
            echo_json({'success': False, 'error': msg})
            sys.exit(1)
        raise click.UsageError('Could not find content file info: %s' % msg)

    for filename in files:
        this_project = Project.discover(filename)
        if this_project is None:
            fail('no project found')
        if project is None:
            project = this_project
        elif project.project_path != this_project.project_path:
            fail('multiple projects')

    if project is None:
        fail('no file indicated a project')

    project_files = []
    for filename in files:
        content_path = project.content_path_from_filename(filename)
        if content_path is not None:
            project_files.append(content_path)

    if not project_files:
        fail('no files resolve in project')

    if as_json:
        echo_json({
            'success': True,
            'project': project.to_json(),
            'paths': project_files,
        })
    else:
        click.echo('Project:')
        click.echo('  Name: %s' % project.name)
        click.echo('  File: %s' % project.project_file)
        click.echo('  Tree: %s' % project.tree)
        click.echo('Paths:')
        for project_file in project_files:
            click.echo('  - %s' % project_file)
Given a list of files this returns the information for those files
dataset/ETHPy150Open lektor/lektor-archive/lektor/cli.py/content_file_info_cmd