def print_script(script):
    """Prints the details of the given script to the console"""
    print('Name: {}'.format(script['name']))
    print('Description: {}'.format(script['description']))
    print('Filename: {}'.format(script['filename']))
    if 'http_method' in script:
        print('HTTP Method: {}'.format(script['http_method']))
    if 'output' in script:
        print('Output Type: {}'.format(script['output']))
    if 'params' in script and len(script['params']) > 0:
        print('Parameters:')
        for param in sorted(script['params']):
            print('  {}: {}'.format(param['name'], param['description']))
    if 'filtered_params' in script and len(script['filtered_params']) > 0:
        print('Filtered parameters:')
        for param in script['filtered_params']:
            print('  {}'.format(param))
    if 'tags' in script and len(script['tags']) > 0:
        print('Tags:')
        for tag in sorted(script['tags']):
            print('  {}'.format(tag))
    print('Lock: {}'.format(script['lock']))
