mirror of
https://github.com/simon987/sist2.git
synced 2025-12-13 15:29:04 +00:00
Initial commit (squashed)
This commit is contained in:
17
scripts/serve_static.py
Normal file
17
scripts/serve_static.py
Normal file
@@ -0,0 +1,17 @@
|
||||
files = [
|
||||
"web/css/bundle.css",
|
||||
"web/js/bundle.js",
|
||||
"web/img/bg-bars.png",
|
||||
"web/img/sprite-skin-flat.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)))
|
||||
Reference in New Issue
Block a user