22 lines
806 B
Python
22 lines
806 B
Python
from datetime import datetime
|
|
from time import sleep
|
|
|
|
from buba.bubaanimator import BubaAnimation
|
|
from buba.bubacmd import BubaCmd
|
|
|
|
|
|
class BubaTime(BubaAnimation):
|
|
def __init__(self, buba: BubaCmd):
|
|
super().__init__(buba)
|
|
|
|
def run(self):
|
|
self.buba.simple_text(page=0, row=0, col=91, text="Bus-Bahn-Anzeige")
|
|
self.buba.simple_text(page=0, row=1, col=0, text="Chaos Computer Club")
|
|
self.buba.simple_text(page=0, row=2, col=0, text="Hansestadt Hamburg")
|
|
self.buba.simple_text(page=0, row=3, col=0, text="Hello, world!")
|
|
self.buba.set_page(0)
|
|
|
|
for i in range(3):
|
|
self.buba.text(page=0, row=0, col_start=93, col_end=119, text=datetime.now().strftime("%H:%M"),
|
|
align=BubaCmd.ALIGN_RIGHT)
|
|
sleep(2)
|