Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added polish characters #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 30 additions & 6 deletions lednamebadge.py
Original file line number Diff line number Diff line change
Expand Up @@ -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' + \
Expand All @@ -236,7 +258,9 @@ class SimpleTextAndIcons:
u"@ ~ |<>,;.:-_#'+* " + \
u"äöüÄÖÜߊ" + \
u"àäòöùüèéêëôöûîïÿç" + \
u"ÀÅÄÉÈÊËÖÔÜÛÙŸ"
u"ÀÅÄÉÈÊËÖÔÜÛÙŸ" + \
U"ąćęłńóśźż" + \
U"ĄĆĘŁŃÓŚŹŻ"

char_offsets = {}
for i in range(len(charmap)):
Expand Down Expand Up @@ -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
Expand Down