https://github.com/shift/ceefax-weather
Inspired by https://news.ycombinator.com/item?id=44590763
https://github.com/shift/ceefax-weather
Last synced: 2 months ago
JSON representation
Inspired by https://news.ycombinator.com/item?id=44590763
- Host: GitHub
- URL: https://github.com/shift/ceefax-weather
- Owner: shift
- Created: 2025-07-17T10:21:38.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2026-03-14T08:25:58.000Z (3 months ago)
- Last Synced: 2026-03-14T18:57:23.029Z (3 months ago)
- Language: Rust
- Size: 58.6 KB
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CEEFAX Weather Map
[](https://asciinema.org/a/e1xnWiUdWwjNQ5UYO4s0s7cCr)
A Rust-based console application that fetches weather data from `wttr.in` and displays it as a retro CEEFAX/TELETEXT-style weather map.
Fully created via promting Gemini 2.5 Pro.
## Features
- **Retro CEEFAX/TELETEXT Interface**: Faithfully recreates the classic teletext aesthetic using a custom RGB color palette and layout.
- **Multiple Countries**: Supports weather maps for both the United Kingdom and Germany.
- **Live Weather Data**: Fetches real-time temperature and weather summaries from the `wttr.in` JSON API.
- **Loading Animation**: Displays a themed "page searching" animation while fetching data in the background.
- **Self-Contained & Reproducible**: Packaged with a Nix flake to ensure it runs reliably with all its dependencies.
## Requirements
- [Nix](https://nixos.org/) (with Flakes enabled)
## How to Run
1. **Clone the repository or save the project files** into a single directory:
- `flake.nix`
- `Cargo.toml`
- `src/main.rs`
2. **Fetch Rust dependencies**: Before the first run, you need to generate the `Cargo.lock` file. Navigate to the project directory in your terminal and run:
```bash
nix develop -c cargo fetch
```
3. **Run the application**:
- **For the UK map (default):**
```bash
nix run .#
```
- **For the German map:**
```bash
nix run .# -- --country germany
```
4. **Exit**: Press any key or `Esc` to close the application.
## Project Structure
- **`flake.nix`**: The Nix flake file that defines the development environment and packages the application. It ensures that the correct Rust toolchain and any system dependencies (like `openssl`) are available.
- **`Cargo.toml`**: The Rust package manager's manifest file. It lists the project's Rust dependencies (crates) like `ratatui`, `reqwest`, and `clap`.
- **`src/main.rs`**: The main application source code. It contains all the logic for fetching data, defining the layouts, and rendering the terminal user interface with `ratatui`.