Open
Conversation
promote my doc review prompts improve my main CODER prompt commit wip FINDER prompt
Portable C program that renders a classic Weather Channel "Local on the 8s" screen using ANSI 24-bit color escape codes. Includes a 5x7 bitmap font, framebuffer-based drawing, and PNG screenshot output via libpng. No GUI, no heavy runtimes — just gcc, libpng, and a terminal. https://claude.ai/code/session_012KpuXnB1cGuo1YehDfp5AH
Split the monolithic weatherstar.c into focused modules: - fb.h: framebuffer types, palette, drawing primitives - font.h: 5x7 bitmap font data and text rendering - icons.h: weather icon drawing (sun, cloud) - display.h: WeatherStar 4000 screen layout composition - screenshot.h: PNG output (libpng) and ANSI terminal output - main.c: entry point and CLI parsing Still compiles as a single translation unit (gcc main.c) — no multi-object build complexity. Remove redundant weatherstar.sh wrapper; Makefile is sufficient. Bug fixes and improvements: - Fix memory leak: row buffer leaked on libpng longjmp error path (allocate before setjmp so it can be freed in the error handler) - Fix rounded-rect corner clearing: use integer distance² comparison instead of sqrtf — faster and avoids float-to-int edge cases - Centralise background gradient into fb_bg_at() helper to eliminate duplicated interpolation code across 4 corner branches - Buffer ANSI output per-line instead of per-pixel printf (10x fewer syscalls, ~3.6 MB output now written in 200 fwrite calls vs 128k) - Add null checks for png_create_write_struct / png_create_info_struct https://claude.ai/code/session_012KpuXnB1cGuo1YehDfp5AH
fce7886 to
825abee
Compare
Design doc for a family dashboard on Pi Zero W: rotating slides rendered with Pillow, blitted directly to /dev/fb0 via mmap. Weather is the first slide, co-located with Pi-hole. https://claude.ai/code/session_012KpuXnB1cGuo1YehDfp5AH
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Portable C program that renders a classic Weather Channel "Local on the
8s" screen using ANSI 24-bit color escape codes. Includes a 5x7 bitmap
font, framebuffer-based drawing, and PNG screenshot output via libpng.
No GUI, no heavy runtimes — just gcc, libpng, and a terminal.
https://claude.ai/code/session_012KpuXnB1cGuo1YehDfp5AH