fix: sort order for urls.json

This commit is contained in:
relikd
2024-03-09 20:06:40 +01:00
parent cea4d18672
commit 1424a5a144

View File

@@ -704,7 +704,7 @@ def export_json():
for newurl, newidx in submap.items():
url_map[newidx] = newurl
with open(CACHE_DIR / 'urls.json', 'w') as fp:
fp.write(json.dumps(url_map, separators=(',\n', ':')))
fp.write(json.dumps(url_map, separators=(',\n', ':'), sort_keys=True))
print(f'write urls.json: {len(url_map)} entries')