add python blinkie example

This commit is contained in:
2026-05-15 20:41:41 +01:00
parent 49ee2d15be
commit 83467531b0
6 changed files with 83 additions and 2 deletions

View File

@@ -3,7 +3,6 @@
# Akbar Rahman <hi@alv.cx>
#
import shlex
import sys
import subprocess
import time
@@ -21,6 +20,7 @@ def get_args():
parser.add_argument("-L", "--no-loop", action="store_true")
return parser.parse_args()
def generate(config):
if config.get('template'):
img = Image.open(config['template'])
@@ -44,7 +44,7 @@ def generate(config):
elif filter == "uppercase":
text = text.upper()
draw.text(config.get('text_offset', [0, 0]), text, font=font)
draw.text(config.get('text_offset', [0, 0]), text, font=font, fill=(255, 255, 255, 255))
img.save(config['output'], save_all=True)