Ignores dirs

This commit is contained in:
Alicia Sykes
2023-04-24 20:03:50 +01:00
parent 27ec4d928a
commit fc619d5aad

View File

@@ -14,13 +14,13 @@ templates = []
# For each file in sources # For each file in sources
for file in files: for file in files:
# Open the file file_path = os.path.join(templates_src_dir, file)
with open(templates_src_dir + file) as f: if os.path.isfile(file_path) and file.endswith('.json'):
if file.endswith('.json'): with open(file_path) as f:
# Load the JSON into a variable # Load the JSON into a variable
data = json.load(f)['templates'] data = json.load(f)['templates']
# Append the template object to the templates list # Append the template object to the templates list
templates = templates + data templates = templates + data
seen_titles = set() seen_titles = set()
filtered_data = [] filtered_data = []