mirror of
https://github.com/losehu/uv-k5-firmware-custom.git
synced 2025-10-23 14:05:35 +08:00
11 lines
340 B
Python
11 lines
340 B
Python
import os
|
|
import json
|
|
|
|
list = []
|
|
for filename in os.listdir(r'.'):
|
|
if len(filename) >= 5 and filename[-5] != 'm' and filename[-4] == '.' and filename[-3] == 'b' and filename[-2] == 'i' and filename[-1] == 'n':
|
|
list.append(filename)
|
|
|
|
print(json.dumps(list))
|
|
with open("version.json","w") as file:
|
|
file.write(json.dumps(list)) |