buba/buba/animations/time.py
Stefan Bethke 64a3c729be Refactor Animation to simplify
Also add some documentation on how to write animations.
2025-06-16 09:33:22 +02:00

18 lines
755 B
Python

from datetime import datetime
from time import sleep
from buba.bubaanimation import BubaAnimation
from buba.bubacmd import BubaCmd
class BubaTime(BubaAnimation):
def __init__(self, buba: BubaCmd):
super().__init__(buba)
def show(self):
self.buba.text(page=0, row=0, col_start=0, col_end=119, text="Chaos Computer Club", align=BubaCmd.ALIGN_CENTER)
self.buba.text(page=0, row=1, col_start=0, col_end=119, text="Hansestadt Hamburg", align=BubaCmd.ALIGN_CENTER)
self.buba.text(page=0, row=2, col_start=0, col_end=119, text="", align=BubaCmd.ALIGN_CENTER)
self.buba.text(page=0, row=3, col_start=0, col_end=119, text=datetime.now().strftime("%Y-%m-%d %H:%M"), align=BubaCmd.ALIGN_CENTER)
sleep(10)