code: def main(args=sys.argv[1:]):
      
      opt = docopt(main.__doc__.strip(), args, options_first=True)
  
      config_logging(opt['--verbose'])
  
      if opt['check']:
          check_backends(opt['--title'])
      elif opt['extract']:
          handler = fulltext.get
  
          if opt['--file']:
              handler = _handle_open
  
          for path in opt['<path>']:
              print(handler(path))
      else:
          # we should never get here
          raise ValueError("don't know how to handle cmd")
docs: Extract text from a file.
  
      Commands:
          extract - extract text from path
          check   - make sure all deps are installed
  
      Usage:
          fulltext extract [-v] [-f] <path>...
          fulltext check [-t]
  
      Options:
          -f, --file           Open file first.
          -t, --title          Check deps for title.
          -v, --verbose        More verbose output.