add filter to cleanyaml. run cleanyaml
parent
8457dc1384
commit
c9476edf04
|
@ -4,6 +4,7 @@
|
||||||
import yaml
|
import yaml
|
||||||
import glob
|
import glob
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,8 +15,15 @@ def main():
|
||||||
|
|
||||||
# gets all files with a yaml extension in the directory
|
# gets all files with a yaml extension in the directory
|
||||||
yfiles = []
|
yfiles = []
|
||||||
|
filter = ""
|
||||||
|
if len(sys.argv) > 1:
|
||||||
|
filter = sys.argv[1]
|
||||||
for file in glob.glob("**/*.yaml", recursive=True):
|
for file in glob.glob("**/*.yaml", recursive=True):
|
||||||
|
if filter == "":
|
||||||
yfiles.append(file)
|
yfiles.append(file)
|
||||||
|
elif file.find(filter) > -1:
|
||||||
|
yfiles.append(file)
|
||||||
|
|
||||||
|
|
||||||
yfiles.sort()
|
yfiles.sort()
|
||||||
print("Going to clean up the following files: {}".format(yfiles))
|
print("Going to clean up the following files: {}".format(yfiles))
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue