def main(argv=None):
    args = parse_args(argv or sys.argv)
    if not args:
        exit(1)
    config_filename = os.path.join(config.config_dir(),
                                   confit.CONFIG_FILENAME)
    if not os.path.exists(config_filename):
        print('Missing configuration file %s.' % config_filename)
    if not os.path.exists(config['link_root_dir'].as_filename()):
        print('Error: links root directory "%s" does not exist.' %
              config['link_root_dir'])
        exit(1)
    linkers = [Linker(field) for field in args['by']]
    for fpath in recursive_glob(args['media_src']):
        item = brain.search_filename(fpath, args['by'])
        if item:
            for linker in linkers:
                linker.flink(item)
        else:
            print('No Open Movie Database matching for %s' % fpath)
dataset/ETHPy150Open Kraymer/flinck/flinck/__init__.py/main/original