mirror of
https://github.com/a2-4am/4cade.git
synced 2024-08-16 12:29:00 +00:00
19 lines
528 B
Python
19 lines
528 B
Python
|
#!/usr/bin/env python3
|
||
|
|
||
|
import sys
|
||
|
|
||
|
alphabet = 'ABCDEFGHIJKL'
|
||
|
coords = []
|
||
|
for filename in sys.argv[1:]:
|
||
|
with open(filename) as f:
|
||
|
lines = f.readlines()
|
||
|
for c in alphabet:
|
||
|
for line, row in zip(lines, range(len(lines))):
|
||
|
for l, col in zip(line, range(len(line))):
|
||
|
if l == c:
|
||
|
if (row, col) not in coords:
|
||
|
coords.append((row, col))
|
||
|
coords.append((255,255))
|
||
|
for row, col in coords:
|
||
|
print(" !byte %s,%s" % (row, col))
|