township: pack + price + upload matches to townshipcombatleague.com
Add ZIP packing, anti-arbitrage odds generation, and chunked upload of a
rendered match to the Township Combat League server (mbetterd 3-step API).
- New tools/township_upload.py: generate_odds (constraint-aware, retries up
to 10x, verified with the server's exact sure-bet checks), check_arbitrage,
build_match_zip (OVER/UNDER/WIN1-2/KO1-2/RET1-2/DRAW, best enhanced variant),
upload_match (create -> chunked zip -> finalize, proxy-safe, progress_cb),
and a content signature for upload-state invalidation.
- Run page: server endpoint/token/fixture-id, "upload after render" checkbox,
and configurable odds ranges; persisted via /save-config + load_config.
- Match page: generate/regenerate odds & ZIP, upload with a progress bar
(polls /job/<id>), and an "Uploaded" badge that clears when the match is
re-rendered, enhanced, edited or deleted.
- Auto-upload after a full render when configured; skips (keeps local) any
match whose odds fail the arbitrage check after 10 tries.
KO/RET odds are coupled to wins by the product cap, so high maxima are not
reachable in a no-arbitrage book; the generator samples wins first then bounds
KO/RET accordingly.
Co-Authored-By:
Claude Opus 4.8 <noreply@anthropic.com>
Showing
This diff is collapsed.
tools/township_upload.py
0 → 100644
This diff is collapsed.
Please
register
or
sign in
to comment