How arthur-dnts/clocktemp works
ClockTemp is a terminal UI for viewing a large-format clock, date and weather, with interactive calendar, stopwatch, timer and help modes. The workflow begins with command-line options, then enters a keyboard-driven render loop that dispatches the selected mode and updates shared state. Rendering helpers format clock digits and calendar rows; temperature is fetched from Open-Meteo when coordinates are supplied. The main-loop excerpt is incomplete, so some dispatch links rely on documented modes and visible module responsibilities rather than inspected call sites.
Main entry points: modes.py Mode rendering · clocktemp.py TUI loop and state · temperature.py Weather lookup · tools.py Key definitions
Components 10
Runtime control
- CLI options
script/clocktemp.py - TUI loop and state
script/clocktemp.py - Key definitions
script/tools.py
Display modes
- Mode rendering
script/modes.py - Clock formatting
script/clock.py - Calendar generation
script/cal.py
Weather data
- Weather lookup
script/temperature.py
Other components
- Terminal user
- Open-Meteo
- Terminal UI
Connections 11
- Terminal user → CLI options: sets options
- CLI options → TUI loop and state: starts UI
- Terminal user → TUI loop and state: presses keys
- TUI loop and state → Key definitions: checks codes
- TUI loop and state → Mode rendering: dispatches modes
- Mode rendering → Clock formatting: formats digits
- Mode rendering → Calendar generation: builds calendar
- Mode rendering → Weather lookup: requests temperature
- Weather lookup → Open-Meteo: requests weather
- TUI loop and state → Terminal UI: renders UI
- Mode rendering → Terminal UI: draws views