<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def main(args=sys.argv[1:]):
 """Extract text from a file. Commands: extract - extract text from path check - make sure all deps are installed Usage: fulltext check [-t] Options: -f, --file Open file first. -t, --title Check deps for title. -v, --verbose More verbose output. """

    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")