91 lines
2.9 KiB
Markdown
91 lines
2.9 KiB
Markdown
# Anno 117: Pax Romana Documentation
|
|
|
|
Structured API-like documentation of all game elements in Anno 117: Pax Romana.
|
|
|
|
## Workflow
|
|
|
|
### 1. Scrape pages
|
|
|
|
**From anno.land:**
|
|
```bash
|
|
# Scrape 1 page (default)
|
|
venv/bin/python python/scraper_anno_world.py
|
|
|
|
# Scrape multiple pages
|
|
venv/bin/python python/scraper_anno_world.py -n 10
|
|
|
|
# Scrape all remaining pages
|
|
venv/bin/python python/scraper_anno_world.py -n 9999
|
|
```
|
|
|
|
**From IGN wiki:**
|
|
```bash
|
|
# Scrape 1 page (default)
|
|
venv/bin/python python/scraper_ign.py
|
|
|
|
# Scrape multiple pages
|
|
venv/bin/python python/scraper_ign.py -n 10
|
|
```
|
|
|
|
This scrapes unchecked URLs from `scraping.md` (anno.land) or `scraping_ign.md` (IGN), 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 1566 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 10 in parallel):
|
|
3. Spawn 10 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` - anno.land URLs to scrape (checkboxes track progress)
|
|
- `scraping_ign.md` - IGN wiki 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_anno_world.py` - anno.land web scraper
|
|
- `python/scraper_ign.py` - IGN wiki web scraper
|
|
|
|
## Data Flow
|
|
|
|
```
|
|
anno.land pages IGN wiki pages
|
|
↓ ↓
|
|
(scraper_anno_world.py) (scraper_ign.py)
|
|
↓ ↓
|
|
└──────────┬─────────────┘
|
|
↓
|
|
scraped_data/*.json
|
|
↓
|
|
(Claude sub-agents)
|
|
↓
|
|
docs/**/*.md
|
|
``` |