code: def main(arguments=None):
      '''Converts a given url with the specified arguments.'''
  
      parsed_options, arguments = get_options(arguments)
  
      image_url = arguments[0]
      image_url = quote(image_url)
  
      try:
          config = Config.load(None)
      except Exception:
          config = None
  
      if not parsed_options.key and not config:
          sys.stdout.write('Error: The -k or --key argument is mandatory. For more information type thumbor-url -h\n')
          return
  
      security_key, thumbor_params = get_thumbor_params(image_url, parsed_options, config)
  
      crypto = CryptoURL(key=security_key)
      url = crypto.generate(**thumbor_params)
      sys.stdout.write('URL:\n')
      sys.stdout.write('%s\n' % url)
  
      return urf main(arguments=None):
      '''Converts a given url with the specified arguments.'''
  
      parsed_options, arguments = get_options(arguments)
  
      image_url = arguments[0]
      image_url = quote(image_url)
  
      try:
          config = Config.load(None)
      except Exception:
          config = None
  
      if not parsed_options.key and not config:
          sys.stdout.write('Error: The -k or --key argument is mandatory. For more information type thumbor-url -h\n')
          return
  
      security_key, thumbor_params = get_thumbor_params(image_url, parsed_options, config)
  
      crypto = CryptoURL(key=security_key)
      url = crypto.generate(**thumbor_params)
      sys.stdout.write('URL:\n')
      sys.stdout.write('%s\n' % url)
  
      return url
docs: Converts a given url with the specified arguments.