From 5ca1a55cba3570cc5c18a1bccd5ee16c404adcd5 Mon Sep 17 00:00:00 2001 From: jvivona Date: Thu, 26 Feb 2026 09:25:05 -0500 Subject: [PATCH 01/10] FIX - national day for changes in RSS feed from source --- apps/nationalday/nationalday.star | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/nationalday/nationalday.star b/apps/nationalday/nationalday.star index de78a42ed..3d1de33c5 100644 --- a/apps/nationalday/nationalday.star +++ b/apps/nationalday/nationalday.star @@ -11,7 +11,8 @@ load("random.star", "random") load("render.star", "render") load("time.star", "time") -VERSION = 24314 +VERSION = 26057 +# 20260226 - fix data source - national day has changed their RSS feeds. use same method we use for TRMNL. TEXT_COLOR = "#fff" TITLE_TEXT_COLOR = "#fff" @@ -36,7 +37,7 @@ def main(config): rc, data = getData() if rc == 0: - json_data = data["national_day"][0][now_unformatted.format("January-2-2006").lower()] + json_data = data["today"] else: json_data = data From ec145fd7577e9d4d44210d25cc9feecd9cc54541 Mon Sep 17 00:00:00 2001 From: jvivona Date: Thu, 19 Mar 2026 14:45:17 -0400 Subject: [PATCH 02/10] quick passover countdown app for the next 10 years --- apps/passover/passover.star | 235 ++++++++++++++++++++++++++++++++++++ 1 file changed, 235 insertions(+) create mode 100644 apps/passover/passover.star diff --git a/apps/passover/passover.star b/apps/passover/passover.star new file mode 100644 index 000000000..114277af0 --- /dev/null +++ b/apps/passover/passover.star @@ -0,0 +1,235 @@ +""" +Applet: Passover +Summary: Passover Countdown & Celebration +Description: Shows countdown to Passover or which day of the 8-day celebration it is +Author: jvivona +""" + +load("render.star", "render") +load("schema.star", "schema") +load("time.star", "time") +load("http.star", "http") +load("encoding/json.star", "json") + +PASSOVER_DATES = [ + {"year": 2026, "start": "2026-04-01", "end": "2026-04-08"}, + {"year": 2027, "start": "2027-04-22", "end": "2027-04-29"}, + {"year": 2028, "start": "2028-04-10", "end": "2028-04-17"}, + {"year": 2029, "start": "2029-03-31", "end": "2029-04-07"}, + {"year": 2030, "start": "2030-04-18", "end": "2030-04-25"}, + {"year": 2031, "start": "2031-04-08", "end": "2031-04-15"}, + {"year": 2032, "start": "2032-03-27", "end": "2032-04-03"}, + {"year": 2033, "start": "2033-04-14", "end": "2033-04-21"}, + {"year": 2034, "start": "2034-04-04", "end": "2034-04-11"}, + {"year": 2035, "start": "2035-03-24", "end": "2035-03-31"}, + {"year": 2036, "start": "2036-04-10", "end": "2036-04-17"} +] + +# Hebrew text for Passover +PASSOVER_HEBREW = "פסח" + +def main(config): + now = time.now().in_location(time.tz()) + + # Find current or next Passover + current_passover = None + next_passover = None + + for passover in PASSOVER_DATES: + start_time = time.parse_time(passover["start"] + "T00:00:00Z").in_location(time.tz()) + end_time = time.parse_time(passover["end"] + "T23:59:59Z").in_location(time.tz()) + + # Check if we're currently in Passover + if now >= start_time and now <= end_time: + current_passover = passover + break + + # Find next Passover + if now < start_time and next_passover == None: + next_passover = passover + break + + if current_passover: + return render_during_passover(current_passover, now, time.tz()) + elif next_passover: + return render_countdown(next_passover, now, time.tz()) + else: + return render_default() + +def render_during_passover(passover, now, timezone): + """Render display during Passover showing which day it is""" + start_time = time.parse_time(passover["start"] + "T00:00:00Z").in_location(timezone) + + # Calculate which day of Passover (1-8) + days_diff = int((now - start_time).hours / 24) + 1 + day_of_passover = min(days_diff, 8) + + # Day names for the 8 days + day_names = [ + "First Seder", + "Second Seder", + "Third Day", + "Fourth Day", + "Fifth Day", + "Sixth Day", + "Seventh Day", + "Eighth Day", + ] + + day_name = day_names[day_of_passover - 1] if day_of_passover <= 8 else "Day " + str(day_of_passover) + + return render.Root( + child = render.Box( + child = render.Column( + expanded = True, + main_align = "space_between", + cross_align = "center", + children = [ + # Top section with Hebrew + render.Box( + height = 8, + child = render.Text( + content = PASSOVER_HEBREW, + font = "6x13", + color = "#FFD700", + ), + ), + # Middle section with celebration text + render.Column( + main_align = "center", + cross_align = "center", + children = [ + render.Text( + content = "חג שמח", + font ="6x13", + color = "#87CEEB", + ), + render.Box(height = 2), + render.Text( + content = day_name, + font = "tom-thumb", + color = "#FFFFFF", + ), + ], + ), + # Bottom section with day number + render.Box( + height = 12, + child = render.Row( + main_align = "center", + cross_align = "center", + children = [ + render.Text( + content = "Day ", + font = "tb-8", + color = "#98D8C8", + ), + render.Text( + content = str(day_of_passover), + font = "tb-8", + color = "#FFD700", + ), + render.Text( + content = " of 8", + font = "tb-8", + color = "#98D8C8", + ), + ], + ), + ), + ], + ), + ), + ) + +def render_countdown(passover, now, timezone): + """Render countdown to next Passover""" + start_time = time.parse_time(passover["start"] + "T00:00:00Z").in_location(time.tz()) + + # Calculate time until Passover + time_until = start_time - now + days_until = int(time_until.hours / 24) + + return render.Root( + child = render.Box( + child = render.Column( + expanded = True, + main_align = "space_between", + cross_align = "center", + children = [ + # Top section with Hebrew + render.Box( + height = 12, + child = render.Text( + content = PASSOVER_HEBREW, + font = "6x13", + color = "#FFD700", + ), + ), + # Middle section with countdown + render.Column( + main_align = "center", + cross_align = "center", + children = [ + render.Text( + content = "Countdown", + font = "tom-thumb", + color = "#87CEEB", + ), + render.Box(height = 1), + render.Row( + main_align = "center", + children = [ + render.Text( + content = str(days_until), + font = "6x13", + color = "#FFD700", + ), + render.Box(width = 2), + render.Text( + content = "days" if days_until != 1 else "day", + font = "6x13", + color = "#FFFFFF", + ), + ], + ), + ], + ), + # Bottom section with year + render.Box( + height = 8, + child = render.Text( + content = str(passover["year"]), + font = "tom-thumb", + color = "#98D8C8", + ), + ), + ], + ), + ), + ) + +def render_default(): + """Default render if no Passover data available""" + return render.Root( + child = render.Box( + child = render.Column( + expanded = True, + main_align = "center", + cross_align = "center", + children = [ + render.Text( + content = PASSOVER_HEBREW, + font = "6x13", + color = "#FFD700", + ), + render.Box(height = 4), + render.Text( + content = "Passover", + font = "tom-thumb", + color = "#FFFFFF", + ), + ], + ), + ), + ) From d209c1899930f162f5fc00cf276f8b5b8451015e Mon Sep 17 00:00:00 2001 From: jvivona Date: Thu, 19 Mar 2026 14:49:48 -0400 Subject: [PATCH 03/10] duh - forgot the yaml file like i don't know how to build tidbyt / tronbyt apps at all :-) --- apps/passover/passover.yaml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 apps/passover/passover.yaml diff --git a/apps/passover/passover.yaml b/apps/passover/passover.yaml new file mode 100644 index 000000000..d597663d6 --- /dev/null +++ b/apps/passover/passover.yaml @@ -0,0 +1,7 @@ +--- +id: passovercountdown +name: PassoverCountdown +summary: Passover Countdown / In Progress +desc: track days until Passover, and show the current status of Passover when it is in progress. +author: jvivona +recommendedInterval: 5 From cddd38d39e23bbb82926dbc4bef865df991f3d51 Mon Sep 17 00:00:00 2001 From: jvivona Date: Thu, 19 Mar 2026 14:53:15 -0400 Subject: [PATCH 04/10] some ai recommended changes --- apps/passover/passover.star | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/passover/passover.star b/apps/passover/passover.star index 114277af0..756364f38 100644 --- a/apps/passover/passover.star +++ b/apps/passover/passover.star @@ -76,7 +76,7 @@ def render_during_passover(passover, now, timezone): "Eighth Day", ] - day_name = day_names[day_of_passover - 1] if day_of_passover <= 8 else "Day " + str(day_of_passover) + day_name = day_names[day_of_passover - 1] return render.Root( child = render.Box( @@ -144,7 +144,7 @@ def render_during_passover(passover, now, timezone): def render_countdown(passover, now, timezone): """Render countdown to next Passover""" - start_time = time.parse_time(passover["start"] + "T00:00:00Z").in_location(time.tz()) + start_time = time.parse_time(passover["start"] + "T00:00:00Z").in_location(timezone) # Calculate time until Passover time_until = start_time - now From e73509ffe0cc278e1ac9798b5ece27cf90c7793f Mon Sep 17 00:00:00 2001 From: jvivona Date: Thu, 19 Mar 2026 15:07:10 -0400 Subject: [PATCH 05/10] fix yaml - I forgot the rules --- apps/passover/passover.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/passover/passover.yaml b/apps/passover/passover.yaml index d597663d6..9bbbbc2e6 100644 --- a/apps/passover/passover.yaml +++ b/apps/passover/passover.yaml @@ -1,7 +1,7 @@ --- -id: passovercountdown +id: passover name: PassoverCountdown summary: Passover Countdown / In Progress -desc: track days until Passover, and show the current status of Passover when it is in progress. +desc: track days until Passover show current when it is in progress. author: jvivona recommendedInterval: 5 From 9ff8cee6d11903cd64909bad39628ca74d69f31c Mon Sep 17 00:00:00 2001 From: jvivona Date: Thu, 19 Mar 2026 15:28:43 -0400 Subject: [PATCH 06/10] yup --- apps/passover/{passover.yaml => manifest.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename apps/passover/{passover.yaml => manifest.yaml} (100%) diff --git a/apps/passover/passover.yaml b/apps/passover/manifest.yaml similarity index 100% rename from apps/passover/passover.yaml rename to apps/passover/manifest.yaml From ca7ad8730b0fba4e74ae0b4408224c2bec7fc71f Mon Sep 17 00:00:00 2001 From: jvivona Date: Thu, 19 Mar 2026 15:29:47 -0400 Subject: [PATCH 07/10] descrption fix --- apps/passover/manifest.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/passover/manifest.yaml b/apps/passover/manifest.yaml index 9bbbbc2e6..d28bee636 100644 --- a/apps/passover/manifest.yaml +++ b/apps/passover/manifest.yaml @@ -2,6 +2,6 @@ id: passover name: PassoverCountdown summary: Passover Countdown / In Progress -desc: track days until Passover show current when it is in progress. +desc: Track days until Passover show current when it is in progress. author: jvivona recommendedInterval: 5 From 792c47c288ee4ceb2c40fb8e2fc95dc1bfaf8669 Mon Sep 17 00:00:00 2001 From: jvivona Date: Thu, 19 Mar 2026 15:32:50 -0400 Subject: [PATCH 08/10] ok - here we go now --- apps/passover/passover.star | 43 +++++++++++-------------------------- 1 file changed, 13 insertions(+), 30 deletions(-) diff --git a/apps/passover/passover.star b/apps/passover/passover.star index 756364f38..021d5b67d 100644 --- a/apps/passover/passover.star +++ b/apps/passover/passover.star @@ -6,49 +6,32 @@ Author: jvivona """ load("render.star", "render") -load("schema.star", "schema") load("time.star", "time") -load("http.star", "http") -load("encoding/json.star", "json") - -PASSOVER_DATES = [ - {"year": 2026, "start": "2026-04-01", "end": "2026-04-08"}, - {"year": 2027, "start": "2027-04-22", "end": "2027-04-29"}, - {"year": 2028, "start": "2028-04-10", "end": "2028-04-17"}, - {"year": 2029, "start": "2029-03-31", "end": "2029-04-07"}, - {"year": 2030, "start": "2030-04-18", "end": "2030-04-25"}, - {"year": 2031, "start": "2031-04-08", "end": "2031-04-15"}, - {"year": 2032, "start": "2032-03-27", "end": "2032-04-03"}, - {"year": 2033, "start": "2033-04-14", "end": "2033-04-21"}, - {"year": 2034, "start": "2034-04-04", "end": "2034-04-11"}, - {"year": 2035, "start": "2035-03-24", "end": "2035-03-31"}, - {"year": 2036, "start": "2036-04-10", "end": "2036-04-17"} -] # Hebrew text for Passover PASSOVER_HEBREW = "פסח" -def main(config): +def main(): now = time.now().in_location(time.tz()) - + # Find current or next Passover current_passover = None next_passover = None - + for passover in PASSOVER_DATES: start_time = time.parse_time(passover["start"] + "T00:00:00Z").in_location(time.tz()) end_time = time.parse_time(passover["end"] + "T23:59:59Z").in_location(time.tz()) - + # Check if we're currently in Passover if now >= start_time and now <= end_time: current_passover = passover break - + # Find next Passover if now < start_time and next_passover == None: next_passover = passover break - + if current_passover: return render_during_passover(current_passover, now, time.tz()) elif next_passover: @@ -59,11 +42,11 @@ def main(config): def render_during_passover(passover, now, timezone): """Render display during Passover showing which day it is""" start_time = time.parse_time(passover["start"] + "T00:00:00Z").in_location(timezone) - + # Calculate which day of Passover (1-8) days_diff = int((now - start_time).hours / 24) + 1 day_of_passover = min(days_diff, 8) - + # Day names for the 8 days day_names = [ "First Seder", @@ -75,9 +58,9 @@ def render_during_passover(passover, now, timezone): "Seventh Day", "Eighth Day", ] - + day_name = day_names[day_of_passover - 1] - + return render.Root( child = render.Box( child = render.Column( @@ -101,7 +84,7 @@ def render_during_passover(passover, now, timezone): children = [ render.Text( content = "חג שמח", - font ="6x13", + font = "6x13", color = "#87CEEB", ), render.Box(height = 2), @@ -145,11 +128,11 @@ def render_during_passover(passover, now, timezone): def render_countdown(passover, now, timezone): """Render countdown to next Passover""" start_time = time.parse_time(passover["start"] + "T00:00:00Z").in_location(timezone) - + # Calculate time until Passover time_until = start_time - now days_until = int(time_until.hours / 24) - + return render.Root( child = render.Box( child = render.Column( From c05e081e328740e8b6e7ebb45fb2d027a26aa634 Mon Sep 17 00:00:00 2001 From: jvivona Date: Thu, 19 Mar 2026 15:33:19 -0400 Subject: [PATCH 09/10] undo date delete --- apps/passover/passover.star | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/apps/passover/passover.star b/apps/passover/passover.star index 021d5b67d..c1d837dc4 100644 --- a/apps/passover/passover.star +++ b/apps/passover/passover.star @@ -8,6 +8,20 @@ Author: jvivona load("render.star", "render") load("time.star", "time") +PASSOVER_DATES = [ + {"year": 2026, "start": "2026-04-01", "end": "2026-04-08"}, + {"year": 2027, "start": "2027-04-22", "end": "2027-04-29"}, + {"year": 2028, "start": "2028-04-10", "end": "2028-04-17"}, + {"year": 2029, "start": "2029-03-31", "end": "2029-04-07"}, + {"year": 2030, "start": "2030-04-18", "end": "2030-04-25"}, + {"year": 2031, "start": "2031-04-08", "end": "2031-04-15"}, + {"year": 2032, "start": "2032-03-27", "end": "2032-04-03"}, + {"year": 2033, "start": "2033-04-14", "end": "2033-04-21"}, + {"year": 2034, "start": "2034-04-04", "end": "2034-04-11"}, + {"year": 2035, "start": "2035-03-24", "end": "2035-03-31"}, + {"year": 2036, "start": "2036-04-10", "end": "2036-04-17"}, +] + # Hebrew text for Passover PASSOVER_HEBREW = "פסח" From 018755d27554ff2ccbd29201e7bcbb4f343f4458 Mon Sep 17 00:00:00 2001 From: jvivona Date: Thu, 19 Mar 2026 15:45:24 -0400 Subject: [PATCH 10/10] add categories & tags --- apps/passover/manifest.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/passover/manifest.yaml b/apps/passover/manifest.yaml index d28bee636..ece11303b 100644 --- a/apps/passover/manifest.yaml +++ b/apps/passover/manifest.yaml @@ -5,3 +5,8 @@ summary: Passover Countdown / In Progress desc: Track days until Passover show current when it is in progress. author: jvivona recommendedInterval: 5 +category: lifestyle +tags: + - holiday + - religious + - countdown \ No newline at end of file