fix(content): argparse --dry-run for generate_corp_stubs.py; populate cross_refs (#828 nits)

- generate_corp_stubs.py: add argparse with --dry-run (prints planned stub
  creations without writing files) and --help
- calloway-distillery.md: cross_refs → [thrds, mercado-travessia]
- thrds.md: cross_refs → [calloway-distillery, mercado-travessia]
- vins-de-grand-vide.md: cross_refs → [nordmark-skog]
- thalassa-resort-group.md: cross_refs → [the-registry, prometheus-labs]

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-19 15:39:41 +02:00
co-authored by Claude Sonnet 4.6
parent add2507eac
commit d78d3b599c
5 changed files with 33 additions and 9 deletions
+29 -5
View File
@@ -1,6 +1,13 @@
#!/usr/bin/env python3
"""Generate minimal wiki stub pages for corps in brands.toml that don't yet have wiki pages."""
"""Generate minimal wiki stub pages for corps in brands.toml that don't yet have wiki pages.
Usage:
python3 tooling/generate_corp_stubs.py [--dry-run]
In --dry-run mode, prints which stubs would be created without writing any files.
"""
import argparse
from pathlib import Path
REPO = Path(__file__).parent.parent
@@ -368,8 +375,20 @@ cross_refs: []
"""
def main():
parser = argparse.ArgumentParser(
description="Generate minimal wiki stub pages for corps in brands.toml."
)
parser.add_argument(
"--dry-run",
action="store_true",
help="Print which stubs would be created without writing any files.",
)
args = parser.parse_args()
corps = parse_brands_toml(BRANDS_TOML)
print(f"Found {len(corps)} unique corp_ids in brands.toml")
if args.dry_run:
print("(dry-run — no files will be written)\n")
created = 0
skipped = 0
@@ -378,12 +397,17 @@ def main():
if stub_path.exists():
skipped += 1
continue
content = generate_stub(slug, meta["origin_system"], meta["brand_category"])
stub_path.write_text(content, encoding="utf-8")
if args.dry_run:
print(f" (dry-run) Would create: {slug}.md")
else:
content = generate_stub(slug, meta["origin_system"], meta["brand_category"])
stub_path.write_text(content, encoding="utf-8")
print(f" created: {slug}.md")
created += 1
print(f" created: {slug}.md")
print(f"\nDone. Created {created} stubs, skipped {skipped} existing.")
action = "Would create" if args.dry_run else "Created"
print(f"\nDone. {action} {created} stubs, skipped {skipped} existing.")
if __name__ == "__main__":
main()
+1 -1
View File
@@ -11,7 +11,7 @@ faction_type: economic
headquarters: Calloway Reach (GJ 3325)
tags: []
decision_refs: []
cross_refs: []
cross_refs: [thrds, mercado-travessia]
---
# Calloway Distillery
+1 -1
View File
@@ -11,7 +11,7 @@ faction_type: economic
headquarters: Gateway (GJ 244A)
tags: [hospitality, fine_dining, entertainment, tractus, assembly, gateway]
decision_refs: [D-175]
cross_refs: []
cross_refs: [the-registry, prometheus-labs]
---
# Thalassa Resort Group
+1 -1
View File
@@ -11,7 +11,7 @@ faction_type: economic
headquarters: Braemar (GJ 475)
tags: []
decision_refs: []
cross_refs: []
cross_refs: [calloway-distillery, mercado-travessia]
---
# thrds
+1 -1
View File
@@ -11,7 +11,7 @@ faction_type: economic
headquarters: Confluent (GJ 395)
tags: []
decision_refs: []
cross_refs: []
cross_refs: [nordmark-skog]
---
# Vins de Grand Vide