add filter to cleanyaml. run cleanyaml

bradl/rescrape-monsters
Brad Laney 2020-09-15 13:50:16 -05:00
parent 8457dc1384
commit c9476edf04
2 changed files with 1314 additions and 1317 deletions

View File

@ -4,6 +4,7 @@
import yaml
import glob
import os
import sys
@ -14,8 +15,15 @@ def main():
# gets all files with a yaml extension in the directory
yfiles = []
filter = ""
if len(sys.argv) > 1:
filter = sys.argv[1]
for file in glob.glob("**/*.yaml", recursive=True):
yfiles.append(file)
if filter == "":
yfiles.append(file)
elif file.find(filter) > -1:
yfiles.append(file)
yfiles.sort()
print("Going to clean up the following files: {}".format(yfiles))

File diff suppressed because it is too large Load Diff