-
Notifications
You must be signed in to change notification settings - Fork 12
/
mass_converter.py
38 lines (28 loc) · 1007 Bytes
/
mass_converter.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import converter, converter_hdr, os
dirs = []
def collect_dirs(dir: str):
print("checking dir: " + dir)
entries = os.listdir(dir)
for entry in entries:
# ignore status script folders
if "Status Scripts" in entry:
continue
if ".git" in entry:
continue
if "smashline" in entry:
continue
if "smashline-hdr" in entry:
continue
entry = os.path.join(dir, entry)
if os.path.isdir(entry):
print("adding: " + entry)
for subdir in os.listdir(entry):
print("checking subdir: " + os.path.join(entry, subdir))
if os.path.isdir(os.path.join(entry, subdir)):
dirs.append(os.path.join(entry, subdir))
collect_dirs(os.path.join(entry, subdir))
collect_dirs("./")
for dir in dirs:
print(dir)
converter.convert(dir, "smashline")
converter_hdr.convert(dir, "smashline-hdr")