We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 47ab466 commit 0646063Copy full SHA for 0646063
devel/site-list.py
@@ -4,8 +4,11 @@
4
import json
5
import os
6
7
+
8
+DATA_REL_URI: str = "sherlock_project/resources/data.json"
9
10
# Read the data.json file
-with open("sherlock_project/resources/data.json", "r", encoding="utf-8") as data_file:
11
+with open(DATA_REL_URI, "r", encoding="utf-8") as data_file:
12
data: dict = json.load(data_file)
13
14
# Removes schema-specific keywords for proper processing
@@ -27,7 +30,7 @@
27
30
site_file.write(f"1. [{social_network}]({url_main}) {is_nsfw}\n")
28
31
29
32
# Overwrite the data.json file with sorted data
-with open("sherlock/resources/data.json", "w") as data_file:
33
+with open(DATA_REL_URI, "w") as data_file:
34
sorted_data = json.dumps(data, indent=2, sort_keys=True)
35
data_file.write(sorted_data)
36
data_file.write("\n")
0 commit comments