First commit with working display

This commit is contained in:
Ricardo LAP
2026-09-13 20:50:51 +00:00
parent a83af259b3
commit c54c68c899
6690 changed files with 1093387 additions and 2 deletions

View File

@@ -0,0 +1,18 @@
#!/usr/bin/env python3
import sys
import textwrap
import re
with open(sys.argv[1], 'r') as file:
s = file.read()
b = bytearray()
if '--filter-character' in sys.argv:
s = re.sub(r'[^\x00-\xff]', '', s)
if '--null-terminate' in sys.argv:
s += '\x00'
b.extend(map(ord, s))
print(textwrap.fill(', '.join([hex(a) for a in b]), 96))