Add polish characters

pull/6/head
Dawid Gosławski 9 months ago
parent ae7195e943
commit 24eaf441c6
  1. 38
      lednamebadge.py

@ -85,7 +85,7 @@ class SimpleTextAndIcons:
0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x60, 0xf0, 0x00,
0x00, 0x7c, 0xc6, 0xc6, 0xc0, 0xc0, 0xce, 0xc6, 0xc6, 0x7e, 0x00,
0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x00,
0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00,
0x00, 0x3c, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00,
0x00, 0x1e, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0xcc, 0xcc, 0x78, 0x00,
0x00, 0xe6, 0x66, 0x6c, 0x6c, 0x78, 0x6c, 0x6c, 0x66, 0xe6, 0x00,
0x00, 0xf0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x00,
@ -228,6 +228,28 @@ class SimpleTextAndIcons:
0x10, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, # Û
0x60, 0x18, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, # Ù
0x66, 0x66, 0x00, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x3c, 0x00, # Ÿ
# ąćęłńóśźż
0x00, 0x00, 0x00, 0x00, 0x78, 0x0c, 0x78, 0xcc, 0xcc, 0x78, 0x08,
0x00, 0x08, 0x10, 0x00, 0x78, 0xc6, 0xc0, 0xc0, 0xc6, 0x78, 0x00,
0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc6, 0x7c, 0x08,
0x00, 0x38, 0x18, 0x18, 0x1c, 0x38, 0x18, 0x18, 0x18, 0x3c, 0x00,
0x00, 0x08, 0x10, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00,
0x00, 0x08, 0x10, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00,
0x00, 0x08, 0x10, 0x00, 0x7c, 0xc6, 0x70, 0x1c, 0xc6, 0x7c, 0x00,
0x00, 0x08, 0x10, 0x00, 0xfe, 0x8c, 0x18, 0x30, 0x62, 0xfe, 0x00,
0x00, 0x00, 0x10, 0x00, 0xfe, 0x8c, 0x18, 0x30, 0x62, 0xfe, 0x00,
# ĄĆĘŁŃÓŚŹŻ
0x00, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x08,
0x08, 0x10, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0xc6, 0x7c, 0x00,
0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x08,
0x00, 0xf0, 0x60, 0x68, 0x70, 0x60, 0xE0, 0x62, 0x66, 0xfe, 0x00,
0x08, 0x10, 0x86, 0xe6, 0xf6, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0x00,
0x08, 0x10, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00,
0x08, 0x10, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0xc6, 0x7c, 0x00,
0x08, 0x10, 0xfe, 0x86, 0x0c, 0x18, 0x30, 0x62, 0xc6, 0xfe, 0x00,
0x10, 0xfe, 0xc6, 0x86, 0x0c, 0x18, 0x30, 0x62, 0xc6, 0xfe, 0x00
)
charmap = u'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + \
@ -236,7 +258,9 @@ class SimpleTextAndIcons:
u"@ ~ |<>,;.:-_#'+* " + \
u"äöüÄÖÜߊ" + \
u"àäòöùüèéêëôöûîïÿç" + \
u"ÀÅÄÉÈÊËÖÔÜÛÙŸ"
u"ÀÅÄÉÈÊËÖÔÜÛÙŸ" + \
U"ąćęłńóśźż" + \
U"ĄĆĘŁŃÓŚŹŻ"
char_offsets = {}
for i in range(len(charmap)):
@ -609,20 +633,20 @@ def main():
parser.add_argument('message', metavar='MESSAGE', nargs='+',
help="Up to 8 message texts with embedded builtin icons or loaded images within colons(:) -- See -l for a list of builtins")
parser.add_argument('--mode-help', action='version', help=argparse.SUPPRESS, version="""
-m 5 "Animation"
Animation frames are 6 character (or 48px) wide. Upload an animation of
N frames as one image N*48 pixels wide, 11 pixels high.
Frames run from left to right and repeat endless.
Speeds [1..8] result in ca. [1.2 1.3 2.0 2.4 2.8 4.5 7.5 15] fps.
Example of a slowly beating heart:
sudo %s -s1 -m5 " :heart2: :HEART2:"
-m 9 "Smooth"
-m 10 "Rotate"
These modes are mentioned in the BMP Badge software.
Text is shown static, or sometimes (longer texts?) not shown at all.
One significant difference is: The text of the first message stays visible after

Loading…
Cancel
Save