File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 4
4
import json
5
5
import os
6
6
7
+
8
+ DATA_REL_URI : str = "sherlock_project/resources/data.json"
9
+
7
10
# Read the data.json file
8
- 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 :
9
12
data : dict = json .load (data_file )
10
13
11
14
# Removes schema-specific keywords for proper processing
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
30
- with open ("sherlock/resources/data.json" , "w" ) as data_file :
33
+ with open (DATA_REL_URI , "w" ) as data_file :
31
34
sorted_data = json .dumps (data , indent = 2 , sort_keys = True )
32
35
data_file .write (sorted_data )
33
36
data_file .write ("\n " )
You can’t perform that action at this time.
0 commit comments