Files
anno-117-docs/README.md
2025-12-30 16:19:50 +01:00

2.2 KiB

Anno 117: Pax Romana Documentation

Structured API-like documentation of all game elements in Anno 117: Pax Romana.

Workflow

1. Scrape pages

# Scrape 1 page (default)
venv/bin/python python/scraper.py

# Scrape multiple pages
venv/bin/python python/scraper.py -n 10

# Scrape all remaining pages
venv/bin/python python/scraper.py -n 9999

This scrapes unchecked URLs from scraping.md, saves JSON to scraped_data/, and adds them to processed.md as pending.

2. Process scraped data into docs/

Use this prompt with Claude Code to process pending JSON files into documentation:

Process 20 pending JSON files from processed.md into docs/.

OUTER LOOP (repeat until X files total are done):
  1. Read processed.md, find next 5 pending files (marked `- [ ]`)
  2. Mark each in-progress: `- [ ]` to `- [~]`

  INNER LOOP (process batch of 5 in parallel):
    3. Spawn 5 Task sub-agents in ONE message (subagent_type="general-purpose", run_in_background=true), one per file:

       "Process scraped_data/{filename} into docs/:
       - Read the JSON
       - Translate: Liberti, Plebejer=Plebeians, Equites, Patrizier=Patricians, Wanderer=Waders, Schmiede=Smiths, Älteste=Elders, Mercatoren=Mercators, Edelmänner=Nobles
       - Target: anno-117-buildings_* → docs/buildings/, anno-117-goods_* → docs/goods/, anno-117-specialists* → docs/specialists/, anno-117-skills_* → docs/skills/
       - Merge if exists, create if not (use existing docs/ as format examples)
       - Update category _index.md if needed
       - Mark done: `- [~] {filename}` to `- [x] {filename}` in processed.md"

    4. Use TaskOutput to wait for all 5 agents to complete

  END INNER LOOP

  5. Count completed files, continue OUTER LOOP until X total done

END OUTER LOOP

Replace X with desired total (e.g., 20).


File Structure

  • scraping.md - URLs to scrape (checkboxes track progress)
  • processed.md - JSON files pending/processed into docs/
  • scraped_data/ - Raw scraped JSON files
  • docs/ - Structured documentation (see CLAUDE.md for structure)
  • python/scraper.py - Web scraper script

Data Flow

anno.land pages
      ↓ (scraper.py)
scraped_data/*.json
      ↓ (Claude sub-agents)
docs/**/*.md