def main():
    robots = set()
    # Command Line Options
    args = parser_setup()

    if args.file:
        xml_file = args.file
    else:
        download_uasparser_xml(download_xml_url, file_uasparser_xml)
        xml_file = file_uasparser_xml

    robots = add_others_to_robots(robots, others)
    robots, user_agents = add_xml_names_to_robots(robots, xml_file)
    optibots = create_optmized_robots_regex(robots)

    # write out robots config excerpt
    with io.open(file_robots_config, "w", encoding="utf8") as fh:
        fh.write(u"[patterns]\n")
        fh.write(optibots % u"robots=%s\n")

    # write out robot users agents for testing
    with io.open(file_user_agents, "w", encoding="utf8") as fh:
        for agent in user_agents:
            fh.write("%s\n" % agent)
dataset/ETHPy150Open ClockworkNet/wtop/robots/create_robots_resources.py/main/swapped operands of `%`