From a4550899be4576ae294ce0de8440c5d9d4f379c4 Mon Sep 17 00:00:00 2001 From: Siddharth Dushantha Date: Fri, 24 May 2024 12:02:36 +0200 Subject: [PATCH] Updated paths based on changes in c065cbb92bfff197decc2084aaa4a51bc0211b16 --- .dockerignore | 2 +- .github/workflows/update-site-list.yml | 2 +- {scripts => devel}/site-list.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) rename {scripts => devel}/site-list.py (85%) diff --git a/.dockerignore b/.dockerignore index 9978ae9..21bb87d 100644 --- a/.dockerignore +++ b/.dockerignore @@ -5,4 +5,4 @@ tests/ *.txt !/requirements.txt venv/ - +devel/ \ No newline at end of file diff --git a/.github/workflows/update-site-list.yml b/.github/workflows/update-site-list.yml index e938a66..5a06793 100644 --- a/.github/workflows/update-site-list.yml +++ b/.github/workflows/update-site-list.yml @@ -30,7 +30,7 @@ jobs: # Execute the site_list.py Python script - name: Execute site-list.py - run: python scripts/site-list.py + run: python devel/site-list.py # Commit any changes made by the script - name: Commit files diff --git a/scripts/site-list.py b/devel/site-list.py similarity index 85% rename from scripts/site-list.py rename to devel/site-list.py index 1f0f05f..1b4a03c 100644 --- a/scripts/site-list.py +++ b/devel/site-list.py @@ -4,7 +4,7 @@ import json # 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) # Removes schema-specific keywords for proper processing @@ -15,7 +15,7 @@ social_networks.pop('$schema', None) social_networks: list = sorted(social_networks.items()) # 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") for social_network, info in social_networks: 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") # 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) data_file.write(sorted_data) data_file.write("\n")