更新文件名修整方法

This commit is contained in:
2ndacc
2020-02-19 21:10:28 +08:00
parent 7e2612bcda
commit 8665653605

View File

@@ -24,7 +24,7 @@ def gen(fn):
s = re.sub("((?:0x.+?,){16})", "\\1\n", s) s = re.sub("((?:0x.+?,){16})", "\\1\n", s)
fn = fn.replace('.', '_') fn = re.sub(r"[^\w]", "_", fn)
print("const unsigned char %s[0x%x] = {\n%s};" % (fn, len(dat), s)) print("const unsigned char %s[0x%x] = {\n%s};" % (fn, len(dat), s))
for fn in glob.glob('*.html'): for fn in glob.glob('*.html'):