initial commit to split repos
This commit is contained in:
14
generate.py
Normal file
14
generate.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import os
|
||||
|
||||
resource_file = "resources.qrc"
|
||||
image_folder = "images"
|
||||
|
||||
with open(resource_file, "w") as f:
|
||||
f.write('<!DOCTYPE RCC><RCC version="1.0">\n<qresource prefix="">\n')
|
||||
for root, _, files in os.walk(image_folder):
|
||||
for file in files:
|
||||
if file.endswith('.png'):
|
||||
f.write(f' <file>{os.path.join(image_folder, file)}</file>\n')
|
||||
f.write('</qresource>\n</RCC>\n')
|
||||
|
||||
print(f"{resource_file} has been generated.")
|
||||
Reference in New Issue
Block a user