File size: 635 Bytes
ff0340e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import glob, os

path_list = glob.glob('vroid/*/*/*.vrm')
print(path_list.__len__())

# replace \\ to /
path_list = [path.replace('\\', '/') for path in path_list]

# remove exist
exist_list = glob.glob("H:/vrm-render/render_image/*")
# change to set
exist_list = [exist.split('\\')[-1].split('_')[0] for exist in exist_list]
exist_list = set(exist_list)

ans_list = []
for path in path_list[:]:
    if path.split('/')[-1].split('.')[0] in exist_list:
        ans_list.append(path)
print(ans_list.__len__())

import json
with open('vroid.json', 'w') as f:
    json.dump(ans_list, f, indent=4)

#print(path_list)