def importAndExport(self, filename, split=0): self.__results = importResult.importResult(filename) self.__exportResult(split, 2) self.__results = []
if (sm == "speed"): SORT_METHOD = "SPEED" elif (sm == "rspeed"): SORT_METHOD = "REVERSE_SPEED" elif (sm == "ping"): SORT_METHOD = "PING" elif (sm == "rping"): SORT_METHOD = "REVERSE_PING" else: logger.error("Sort method %s not support." % sm) if (options.import_file and CONFIG_LOAD_MODE == 0): IMPORT_FILENAME = options.import_file er = ExportResult() er.setColors(RESULT_IMAGE_COLOR) er.export(importResult.importResult(IMPORT_FILENAME), SPLIT_CNT, 1, SORT_METHOD) sys.exit(0) if (PROXY_TYPE == "SSR"): client = SSRClient() uConfigParser = SSRParser() elif (PROXY_TYPE == "SSR-C#"): client = SSRClient() client.useSsrCSharp = True uConfigParser = SSRParser() elif (PROXY_TYPE == "SS"): client = SSClient() uConfigParser = SSParser() elif (PROXY_TYPE == "V2RAY"): client = V2RayClient()
# print(sm) if (sm == "speed"): SORT_METHOD = "SPEED" elif (sm == "rspeed"): SORT_METHOD = "REVERSE_SPEED" elif (sm == "ping"): SORT_METHOD = "PING" elif (sm == "rping"): SORT_METHOD = "REVERSE_PING" else: logger.error("Sort method %s not support." % sm) if (options.import_file and CONFIG_LOAD_MODE == 0): IMPORT_FILENAME = options.import_file export( sortResult(importResult.importResult(IMPORT_FILENAME), SORT_METHOD), SPLIT_CNT, 2, RESULT_IMAGE_COLOR) sys.exit(0) if (PROXY_TYPE == "SSR"): client = SSRClient() uConfigParser = SSRParser() elif (PROXY_TYPE == "SS"): client = SSClient() uConfigParser = SSParser() if (CONFIG_LOAD_MODE == 1): uConfigParser.readGuiConfig(CONFIG_FILENAME) else: uConfigParser.readSubscriptionConfig(CONFIG_URL) uConfigParser.excludeNode([], [], config["excludeRemarks"])