erster Test für DRCs in makePage
This commit is contained in:
parent
d1a87fc1a7
commit
5eb87bf7da
BIN
doc/DRCs.ods
BIN
doc/DRCs.ods
Binary file not shown.
36
tools/drcs.py
Normal file
36
tools/drcs.py
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
|
# -*- coding: UTF-8 -*-
|
||||||
|
'''
|
||||||
|
rtx - RetroText
|
||||||
|
by Anna Christina Naß <acn@acn.wtf>
|
||||||
|
released under GPL
|
||||||
|
|
||||||
|
drcs.py: Enthält eine DRC-Sammlung
|
||||||
|
'''
|
||||||
|
|
||||||
|
pyramide = ( # 4 Zeichen, 4farbig
|
||||||
|
b"\x1f\x23\x21\x30" b"\x40\x40\x2e"
|
||||||
|
b"\x31" b"\x40\x41\x40\x43\x21\x40\x47\x21\x40\x4f\x21\x40\x5f\x21\x40\x7f"
|
||||||
|
b"\x30" b"\x40\x40\x27\x42\x40\x47\x40"
|
||||||
|
b"\x31" b"\x60\x40\x70\x40\x21\x78\x40\x21\x7c\x40\x21\x78\x40\x21\x70\x40"
|
||||||
|
b"\x30" b"\x40\x40\x26\x40\x41\x22"
|
||||||
|
b"\x31" b"\x40\x7f\x41\x7f\x21\x43\x7f\x21\x47\x7e\x21\x4f\x7c\x4f\x7d\x5f\x78"
|
||||||
|
b"\x30" b"\x47\x40\x4e\x40\x4e\x60\x5d\x70\x7b\x70\x67\x70\x5e\x48\x71\x7c\x4f\x7c\x7f\x7e"
|
||||||
|
b"\x31" b"\x70\x40\x60\x40\x21\x41\x70\x43\x70\x47\x70\x5e\x40\x70\x40\x40\x40\x21"
|
||||||
|
)
|
||||||
|
|
||||||
|
colorpyramide = (
|
||||||
|
b"\x1f\x26\x30\x47"
|
||||||
|
b"\x1f\x26\x31\x4f"
|
||||||
|
b"\x1f\x26\x32\x41"
|
||||||
|
b"\x1f\x26\x33\x43"
|
||||||
|
)
|
||||||
|
|
||||||
|
liste = [
|
||||||
|
(b"reset_12x10_4c", b"\x1f\x23\x20\x28\x20\x40\x47\x42"),
|
||||||
|
(b"reset_12x10_2c", b"\x1f\x23\x20\x28\x20\x40\x47\x41"),
|
||||||
|
(b"Dcolorstart", b"\x1f\x26\x20\x22\x20\x35\x40"),
|
||||||
|
(b"Dcolorpyramide", colorpyramide),
|
||||||
|
(b"Dpyramide", pyramide),
|
||||||
|
]
|
||||||
|
|
@ -17,6 +17,7 @@ import sys
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
import tagliste
|
import tagliste
|
||||||
|
import drcs
|
||||||
|
|
||||||
# Kommandozeilenparameter verarbeiten:
|
# Kommandozeilenparameter verarbeiten:
|
||||||
|
|
||||||
@ -54,6 +55,11 @@ for el in tagliste.liste:
|
|||||||
# 'new' ist el[1]
|
# 'new' ist el[1]
|
||||||
outdata = outdata.replace(old, el[1])
|
outdata = outdata.replace(old, el[1])
|
||||||
|
|
||||||
|
for el in drcs.liste:
|
||||||
|
old = b'<' + el[0] + b'>'
|
||||||
|
# 'new' ist el[1]
|
||||||
|
outdata = outdata.replace(old, el[1])
|
||||||
|
|
||||||
# Ausgabedatei öffnen und Daten schreiben:
|
# Ausgabedatei öffnen und Daten schreiben:
|
||||||
outfile = open(outfilename, 'wb')
|
outfile = open(outfilename, 'wb')
|
||||||
outfile.write(outdata)
|
outfile.write(outdata)
|
||||||
|
Loading…
Reference in New Issue
Block a user