This commit is contained in:
2025-12-30 15:44:54 +01:00
parent 4fb120723d
commit 10a5da4cc3
5 changed files with 121 additions and 28 deletions

View File

@@ -22,24 +22,23 @@ This scrapes unchecked URLs from `scraping.md`, saves JSON to `scraped_data/`, a
### 2. Process scraped data into docs/
```bash
# Process one file (can run multiple in parallel)
# Process 1 file (default)
venv/bin/python python/process.py
# Process multiple in parallel (e.g., 4 at once)
for i in {1..4}; do venv/bin/python python/process.py & done; wait
# Process 5 files
venv/bin/python python/process.py -n 5
# Process all remaining files (4 parallel workers)
while venv/bin/python python/process.py; do :; done &
while venv/bin/python python/process.py; do :; done &
while venv/bin/python python/process.py; do :; done &
while venv/bin/python python/process.py; do :; done &
wait
# Process all remaining files
venv/bin/python python/process.py -n 9999
# Process in parallel (e.g., 4 workers processing 10 files each)
for i in {1..4}; do venv/bin/python python/process.py -n 10 & done; wait
```
The script uses file locking to safely run in parallel. Each invocation:
1. Claims one pending JSON file from `processed.md`
2. Calls Claude to parse it into the `docs/` folder structure
3. Marks it as completed
1. Claims pending JSON files from `processed.md`
2. Calls Claude to parse them into the `docs/` folder structure
3. Marks them as completed
---

View File

@@ -26,6 +26,9 @@ All production, service, and infrastructure buildings in Anno 117.
### Food Production (Tier II)
- [Bakery](./bakery.md) - Produces Bread
### Shrines
- [Shrine of Cernunnos (Latium)](./shrine-of-cernunnos-latium.md) - Faith and Health area effects
## Placement Rules
Most buildings require:

View File

@@ -0,0 +1,67 @@
# Shrine of Cernunnos (Latium)
**Entity Type:** Building
## Properties
| Field | Value |
|-------|-------|
| Region | Latium |
| Category | Shrine |
| Required Tier | [Equites](../population-tiers/tier-iii.md) |
| Dimensions | 3x3 (base), 4x4 (with roads) |
| Unlock Condition | Enough Faith |
## Description
Religious shrine dedicated to the Celtic god Cernunnos, providing faith and health area effects.
## Costs
**Build Cost:** 100 gold, 5 Concrete
**Maintenance:** -16 gold
## Placement
| Requirement | Value |
|-------------|-------|
| Road Required | Unknown |
| Warehouse Required | Unknown |
## Production
**Input:** None
**Output:** None (Service building)
## Area Effects
| Effect | Value |
|--------|-------|
| Faith | +1 |
| Health | +1 |
## Specialists
| Specialist | Effects |
|------------|---------|
| Brian the Multiply Blessed | Shrines in range: +0.5 Satisfaction, +0.5 Health, +0.5 Fire Safety area effects, -25% maintenance. Legendary bonus: Follows the correct number of gods. |
## Related Buildings
Other Shrines:
- [Shrine of Ceres (Latium)](./shrine-of-ceres-latium.md)
- [Shrine of Epona (Latium)](./shrine-of-epona-latium.md)
- [Shrine of Mars (Latium)](./shrine-of-mars-latium.md)
- [Shrine of Mercury-Lugus (Latium)](./shrine-of-mercury-lugus-latium.md)
- [Shrine of Minerva (Latium)](./shrine-of-minerva-latium.md)
- [Shrine of Neptune (Latium)](./shrine-of-neptune-latium.md)
## Usage Patterns
Place near residential areas to provide faith and health bonuses.
## Common Pitfalls
Requires faith unlock before construction.

View File

@@ -12,8 +12,8 @@ When Claude processes a JSON file and adds its data to docs.md, mark it here.
- [x] anno-117-buildings_makrelenhuette-latium.json
## Pending Files
- [~] anno-117-buildings_schrein-von-cernunnos-latium.json
- [ ] anno-117-buildings_schrein-von-epona-latium.json
- [x] anno-117-buildings_schrein-von-cernunnos-latium.json
- [~] anno-117-buildings_schrein-von-epona-latium.json
- [ ] anno-117-buildings_schrein-von-ceres-latium.json
- [ ] anno-117-buildings_officium-latium.json
- [ ] anno-117-buildings_villa-des-praetors-latium.json

View File

@@ -1,13 +1,16 @@
#!/usr/bin/env python3
"""
Process one pending JSON file into the docs/ structure using Claude.
Process pending JSON files into the docs/ structure using Claude.
Usage:
venv/bin/python python/process.py
venv/bin/python python/process.py # Process 1 file (default)
venv/bin/python python/process.py -n 5 # Process 5 files
venv/bin/python python/process.py -n 9999 # Process all files
Run multiple times in parallel to process faster.
Run multiple instances in parallel to process faster.
"""
import argparse
import subprocess
import sys
import re
@@ -133,20 +136,41 @@ def process_file(json_file: str) -> bool:
def main():
json_file = claim_pending_file()
parser = argparse.ArgumentParser(description="Process pending JSON files into docs/")
parser.add_argument(
"-n", "--count",
type=int,
default=1,
help="Number of files to process (default: 1)"
)
args = parser.parse_args()
if not json_file:
print("No pending files to process")
return
processed = 0
failed = 0
print(f"Processing: {json_file}")
for i in range(args.count):
json_file = claim_pending_file()
if process_file(json_file):
mark_completed(json_file)
print(f"Completed: {json_file}")
else:
mark_failed(json_file)
print(f"Failed: {json_file}", file=sys.stderr)
if not json_file:
if processed == 0:
print("No pending files to process")
break
print(f"[{i + 1}/{args.count}] Processing: {json_file}")
if process_file(json_file):
mark_completed(json_file)
print(f"Completed: {json_file}")
processed += 1
else:
mark_failed(json_file)
print(f"Failed: {json_file}", file=sys.stderr)
failed += 1
if processed > 0 or failed > 0:
print(f"\nDone! Processed: {processed}, Failed: {failed}")
if failed > 0:
sys.exit(1)