nerdletter-cypher/CLAUDE.md

46 lines
2.4 KiB
Markdown
Raw Permalink Normal View History

# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Project Overview
Nerdletter Cypher is a collection of bash scripts that generate "numbers station" style MP4 videos for the Nerdletter newsletter. Each video displays a ciphertext message with retro green-on-black terminal aesthetics and a synthesized voice reading the message aloud, mimicking cold-war shortwave numbers stations (specifically the Lincolnshire Poacher style).
Subscribers use a "Day Book" (a one-time pad or codebook) to decode the ciphertext messages.
## Script Variants
All scripts live in `scripts/` and share a common interface:
```bash
./script.sh "CIPHERTEXT GROUPS" PAGE_NUMBER [EPISODE_NUMBER]
# Example: ./script.sh "HLXIB JACJP ERXHN EFM" 001 01
```
- **nerdletter_numbers_station.sh** — Original basic version (espeak-ng + ffmpeg, single pass)
- **nerdletter_numbers_station_linux.sh** — Linux variant with letter-by-letter pronunciation
- **nerdletter_numbers_station_mac.sh** / **_mac_old.sh** — macOS variants (uses `Courier New` font for Homebrew ffmpeg compatibility)
- **nerdletter_numbers_station_poacher.sh** through **poacher10.sh** — Iterative refinements adding: Lincolnshire Poacher intro music, shortwave static mixing, letter-by-letter speech with inter-group pauses, longer durations, and audio layering
The `poacher` series represents progressive iterations. The highest-numbered poacher script (`poacher10.sh`) is the most refined version with letter-by-letter speech, pauses between cipher groups, and full audio mixing (poacher intro + static + voice).
## Dependencies
- **espeak-ng** — text-to-speech synthesis (voice: `en+f3`, female)
- **ffmpeg** — video generation, audio mixing, and final MP4 encoding
- **wget** — (poacher scripts only) for downloading the Lincolnshire Poacher intro audio from archive.org
## Assets
- `assets/poacher_intro.wav` — Lincolnshire Poacher music intro clip
- `assets/static.wav` — Shortwave radio static noise
- `output/` — Generated MP4 files land here (though some scripts output to the current working directory)
## Key Parameters Across Scripts
espeak-ng flags control the voice character:
- `-s` speech rate (lower = slower/more dramatic, ranges from 74-120 across variants)
- `-k` capitals emphasis
- `-a` amplitude/volume
- `-ven+f3` English female voice variant 3