Initial release: full Arma 3 mod management toolchain
Pipeline: parse HTML presets, compare modlists, download from Caddy file server, create junctions/symlinks to Arma 3 Server directory. Includes update/sync flows, missing-mod reporting, OS compat layer, shared config, dep checker, comprehensive test suite (71 tests). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
32
compare_modlists.py
Normal file
32
compare_modlists.py
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env python3
|
||||
"""CLI entry point: compare all mod presets in modlist_html/ -> modlist_json/comparison.json."""
|
||||
|
||||
import json
|
||||
|
||||
from arma_modlist_tools import parse_modlist_dir, compare_presets
|
||||
from arma_modlist_tools.config import load_config
|
||||
|
||||
|
||||
def main():
|
||||
cfg = load_config()
|
||||
|
||||
presets = parse_modlist_dir(cfg.modlist_html)
|
||||
if len(presets) < 2:
|
||||
print("Need at least 2 preset files in modlist_html/ to compare.")
|
||||
return
|
||||
|
||||
result = compare_presets(*presets)
|
||||
|
||||
cfg.modlist_json.mkdir(exist_ok=True)
|
||||
cfg.comparison.write_text(json.dumps(result, indent=2, ensure_ascii=False), encoding="utf-8")
|
||||
|
||||
shared = result["shared"]["mod_count"]
|
||||
print(f"Compared: {', '.join(result['compared_presets'])}")
|
||||
print(f" Shared mods : {shared}")
|
||||
for preset_name, data in result["unique"].items():
|
||||
print(f" Unique to {preset_name}: {data['mod_count']}")
|
||||
print(f" -> {cfg.comparison}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user