Getting Started
First, run the development server:
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.js. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Inter, a custom Google Font.
Python environment
The scripts use the Anthropic SDK. Set up:
uv venv env --python 3.11
source env/bin/activate
uv pip install anthropic python-dotenvThen add your key to .env:
ANTHROPIC_API_KEY=sk-ant-...
Add a new translation
- Activate the virtual environment:
source env/bin/activate - Edit
add_translator.pyand setname = "<Translator Name>". - Run
python add_translator.py. It scaffolds an entry innew_translators.json. - Diff against
translators.jsonand copy over when satisfied. - Fill in
year,tags, andlinksby hand. - Add the five passages by searching the translation for:
- Book 1, intro (lines 1-14)
- Book 5, Athena to Diomedes about Tydeus (line ~800)
- Book 6, the leaves simile (line ~145)
- Book 9, two fates / glory speech (line ~410)
- Book 21, Achilles to Lycaon (line ~99)
- Run
python generate_descriptions.pyto generate the new description (and refresh existing ones). - Run
python generate_comparisons.pyto generate pairwise comparisons with the new translator.SKIP_EXISTING = Truemeans only new pairs are generated. - Both scripts write to
*.staging.jsonfiles. Diff against the live JSON, then copy over when satisfied. - Commit.
Regenerate all descriptions and comparisons
To force a full regenerate (not just new entries):
python generate_descriptions.pyalways rewrites every description.- For comparisons, set
SKIP_EXISTING = Falseingenerate_comparisons.pyand deletecomparisons.staging.jsonfirst.
The Greek passages used as context for both scripts live in passages.json.