|
|
@ -4,7 +4,7 @@
|
|
|
|
import json
|
|
|
|
import json
|
|
|
|
|
|
|
|
|
|
|
|
# Read the data.json file
|
|
|
|
# Read the data.json file
|
|
|
|
with open("sherlock/resources/data.json", "r", encoding="utf-8") as data_file:
|
|
|
|
with open("../sherlock/resources/data.json", "r", encoding="utf-8") as data_file:
|
|
|
|
data: dict = json.load(data_file)
|
|
|
|
data: dict = json.load(data_file)
|
|
|
|
|
|
|
|
|
|
|
|
# Removes schema-specific keywords for proper processing
|
|
|
|
# Removes schema-specific keywords for proper processing
|
|
|
@ -15,7 +15,7 @@ social_networks.pop('$schema', None)
|
|
|
|
social_networks: list = sorted(social_networks.items())
|
|
|
|
social_networks: list = sorted(social_networks.items())
|
|
|
|
|
|
|
|
|
|
|
|
# Write the list of supported sites to sites.md
|
|
|
|
# Write the list of supported sites to sites.md
|
|
|
|
with open("sites.md", "w") as site_file:
|
|
|
|
with open("../sites.md", "w") as site_file:
|
|
|
|
site_file.write(f"## List Of Supported Sites ({len(social_networks)} Sites In Total!)\n")
|
|
|
|
site_file.write(f"## List Of Supported Sites ({len(social_networks)} Sites In Total!)\n")
|
|
|
|
for social_network, info in social_networks:
|
|
|
|
for social_network, info in social_networks:
|
|
|
|
url_main = info["urlMain"]
|
|
|
|
url_main = info["urlMain"]
|
|
|
@ -23,7 +23,7 @@ with open("sites.md", "w") as site_file:
|
|
|
|
site_file.write(f"1. ![](https://www.google.com/s2/favicons?domain={url_main}) [{social_network}]({url_main}) {is_nsfw}\n")
|
|
|
|
site_file.write(f"1. ![](https://www.google.com/s2/favicons?domain={url_main}) [{social_network}]({url_main}) {is_nsfw}\n")
|
|
|
|
|
|
|
|
|
|
|
|
# Overwrite the data.json file with sorted data
|
|
|
|
# Overwrite the data.json file with sorted data
|
|
|
|
with open("sherlock/resources/data.json", "w") as data_file:
|
|
|
|
with open("../sherlock/resources/data.json", "w") as data_file:
|
|
|
|
sorted_data = json.dumps(data, indent=2, sort_keys=True)
|
|
|
|
sorted_data = json.dumps(data, indent=2, sort_keys=True)
|
|
|
|
data_file.write(sorted_data)
|
|
|
|
data_file.write(sorted_data)
|
|
|
|
data_file.write("\n")
|
|
|
|
data_file.write("\n")
|