mirror of
https://github.com/simon987/sist2.git
synced 2025-04-19 18:26:43 +00:00
19 lines
461 B
Python
19 lines
461 B
Python
files = [
|
|
"web/css/bundle.css",
|
|
"web/css/bundle_dark.css",
|
|
"web/js/bundle.js",
|
|
"web/img/sprite-skin-flat.png",
|
|
"web/img/sprite-skin-flat-dark.png",
|
|
"web/search.html",
|
|
]
|
|
|
|
|
|
def clean(filepath):
|
|
return filepath.split("/")[-1].replace(".", "_").replace("-", "_")
|
|
|
|
|
|
for file in files:
|
|
with open(file, "rb") as f:
|
|
data = f.read()
|
|
print("char %s[%d] = {%s};" % (clean(file), len(data), ",".join(str(int(b)) for b in data)))
|