When deleting unused templates, check whether template is a PSD file

This commit is contained in:
DUOLabs333
2022-11-11 12:17:05 -05:00
parent 4076166b47
commit f748ef091e

View File

@@ -142,7 +142,7 @@ for template in templates_db:
download_file(path,outfn)
templates_local=[_ for _ in glob.glob(root + 'templates/file/**/*', recursive=True)]
templates_local=[_ for _ in glob.glob(root + 'templates/file/**/*', recursive=True) if _.endswith(".psd")]
templates_db=[root+"templates/"+_ for _ in templates_db]
for tpl in list(set(templates_local)-set(templates_db)):
@@ -180,4 +180,4 @@ find_and_replace('code/pp/pp.js','"templates/?type="','"templates/index.html?typ
find_and_replace('code/pp/pp.js','"https://f000.backblazeb2.com/file/"', '"templates/file/"')
# Having ? in static sites doesn't really work
#find_and_replace("templates/index.html",'sch.split("?");','sch.split("#");')
#find_and_replace("templates/index.html",'sch.split("?");','sch.split("#");')