Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Toperlock authored Jan 2, 2024
1 parent 48e5ecb commit 599c54f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def parse_list_file(link, output_directory):
# 使用 output_directory 拼接完整路径
file_name = os.path.join(output_directory, f"{os.path.basename(link).split('.')[0]}.json")
with open(file_name, 'w', encoding='utf-8') as output_file:
json.dump(result_rules, output_file, ensure_ascii=False, indent=2)
json.dump(sort_dict(result_rules), output_file, ensure_ascii=False, indent=2)

srs_path = file_name.replace(".json", ".srs")
os.system(f"sing-box rule-set compile --output {srs_path} {file_name}")
Expand Down

0 comments on commit 599c54f

Please sign in to comment.