mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
5511e18133
* Mark headers as non-executable * Update shebangs
18 lines
374 B
Python
Executable File
18 lines
374 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
from pathlib import Path
|
|
from sys import argv
|
|
import re
|
|
|
|
if __name__ == "__main__":
|
|
infile, outfile, cname = argv[1:]
|
|
|
|
with open(outfile, "w") as f:
|
|
f.write(f"unsigned char {cname}[] = {{ ")
|
|
|
|
with open(infile, "rb") as i:
|
|
for char in i.read():
|
|
f.write(f'0x{char:02X}, ')
|
|
|
|
f.write(f"}};\n")
|