mirror of
https://gitlab.com/jrmiller82/pathfinder-2-sqlite.git
synced 2026-11-10 21:29:44 -05:00
add filter to cleanyaml. run cleanyaml
This commit is contained in:
1 parent
8457dc1384
commit
c9476edf04
2 files changed
+1314
-1317
No files matched your search
+9
-1
@@ -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):
|
||||||
yfiles.append(file)
|
if filter == "":
|
||||||
|
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))
|
||||||
|
|||||||
+1305
-1316
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user