Skip to content

Commit

Permalink
fix: file not found
Browse files Browse the repository at this point in the history
  • Loading branch information
ppfeister committed Aug 23, 2024
1 parent 47ab466 commit 0646063
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions devel/site-list.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
import json
import os


DATA_REL_URI: str = "sherlock_project/resources/data.json"

# Read the data.json file
with open("sherlock_project/resources/data.json", "r", encoding="utf-8") as data_file:
with open(DATA_REL_URI, "r", encoding="utf-8") as data_file:
data: dict = json.load(data_file)

# Removes schema-specific keywords for proper processing
Expand All @@ -27,7 +30,7 @@
site_file.write(f"1. [{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(DATA_REL_URI, "w") as data_file:
sorted_data = json.dumps(data, indent=2, sort_keys=True)
data_file.write(sorted_data)
data_file.write("\n")
Expand Down

0 comments on commit 0646063

Please sign in to comment.