-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlist_maps.py
More file actions
46 lines (39 loc) · 958 Bytes
/
list_maps.py
File metadata and controls
46 lines (39 loc) · 958 Bytes
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
39
40
41
42
43
44
45
46
import os
folder = "/var/www/files.femboy.kz/cs2/maps"
output = "vpk_list.txt"
skip_keywords = [
"vanity",
"preview",
"lobby",
"match",
"inspect",
"xpshop",
"icon",
"skybox",
"intro",
"template",
"backdrop",
"scene",
"smartprop",
"csgo_ui",
"settings",
"major",
"nametag",
"acknowledge_item",
"team_select",
"buy_menu",
"medal",
]
vpk_names = []
for root, dirs, files in os.walk(folder):
for file in files:
if file.lower().endswith(".vpk"):
base_name = os.path.splitext(file)[0]
lower_name = base_name.lower()
if any(keyword in lower_name for keyword in skip_keywords):
continue
vpk_names.append(base_name)
sorted_names = sorted(vpk_names)
with open(output, "w") as f:
f.write("\n".join(sorted_names))
print(f"Found {len(sorted_names)} VPK files, results saved to {output}")