Updates lib scripts to use sources, not external

This commit is contained in:
Alicia Sykes
2023-04-16 21:14:01 +01:00
parent 09e8f9b6c0
commit 8c221377d2
6 changed files with 13 additions and 6 deletions

View File

@@ -1,9 +1,9 @@
import os
import json
# Get list of files in external-templates
# Get list of files in sources
dir = os.path.dirname(os.path.abspath(__file__))
templates_src_dir = os.path.join(dir, '../external-templates/')
templates_src_dir = os.path.join(dir, '../sources/')
template_dest_file = os.path.join(dir, '../templates.json')
files = os.listdir(templates_src_dir)
@@ -11,7 +11,7 @@ files = os.listdir(templates_src_dir)
# Initialize empty list to store template objects
templates = []
# For each file in external-templates
# For each file in sources
for file in files:
# Open the file
with open(templates_src_dir + file) as f:

View File

@@ -4,7 +4,7 @@ import requests
dir = os.path.dirname(os.path.abspath(__file__))
destination_dir = os.path.join(dir, '../external-templates')
destination_dir = os.path.join(dir, '../sources')
sources_list = os.path.join(dir, '../sources.csv')
# Downloads the file from a given URL, to the local destination