Python library for parsing BattleScribe/NewRecruit roster JSON. Extracted from Nachmund Tracker's processJSON, ported JS→Python. - parse_roster(json_string) / parse_roster_file(path) → RosterSummary - Extracts: unit name, pts, CP, model count, weapon breakdown per model variant - Handles: variable-model-count units, nested costs, compound upgrades - Unicode apostrophe-safe unit lookup (find_unit) - to_dict() for JSON serialization - 8/8 tests passing on real roster data (27 units, 2815pts)
15 lines
446 B
TOML
15 lines
446 B
TOML
[build-system]
|
|
requires = ["setuptools>=61.0"]
|
|
build-backend = "setuptools.backends._legacy:_Backend"
|
|
|
|
[project]
|
|
name = "bs-roster-parser"
|
|
version = "1.0.0"
|
|
description = "Parse BattleScribe/NewRecruit roster JSON into flat unit lists with costs, model counts, and weapon breakdowns"
|
|
readme = "README.md"
|
|
requires-python = ">=3.10"
|
|
license = { text = "MIT" }
|
|
authors = [{ name = "Kay Kayyali" }]
|
|
|
|
[tool.setuptools]
|
|
packages = ["bs_roster_parser"] |