v0.5.84: matches origin filter, mobile gate, refresh reliability.
Ship Web refresh cache/lock, mobile demand gate, matches 职业/国服 filter, and related site updates through 0.5.84. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -29,7 +29,7 @@ from datetime import datetime, timezone
|
||||
|
||||
from shared.grid import hero_table
|
||||
from shared.hero_tags import ILLUSION_KEYS
|
||||
from shared.http_utils import download_icons, http_json
|
||||
from shared.http_utils import download_icons, http_json, write_json_atomic
|
||||
from shared.paths import ABILITY_ICONS, DATA
|
||||
|
||||
from loc_format import format_loc, strip_html
|
||||
@@ -660,10 +660,7 @@ def main() -> None:
|
||||
meta["tags_only"] = True
|
||||
meta["mechanic_tag_order"] = list(QUERY_MECHANIC_ORDER)
|
||||
payload = {"meta": meta, "by_hero": by_hero}
|
||||
args.out.write_text(
|
||||
json.dumps(payload, ensure_ascii=False, indent=2) + "\n",
|
||||
encoding="utf-8",
|
||||
)
|
||||
write_json_atomic(args.out, payload)
|
||||
print(
|
||||
f"retag done: {len(by_hero)} heroes, {tagged} abilities with tags -> {args.out}",
|
||||
flush=True,
|
||||
@@ -723,10 +720,7 @@ def main() -> None:
|
||||
},
|
||||
"by_hero": by_hero,
|
||||
}
|
||||
args.out.write_text(
|
||||
json.dumps(payload, ensure_ascii=False, indent=2) + "\n",
|
||||
encoding="utf-8",
|
||||
)
|
||||
write_json_atomic(args.out, payload)
|
||||
illus = sum(1 for c in by_hero.values() if (c.get("summary") or {}).get("has_illusion"))
|
||||
print(f"resummarized {len(by_hero)} heroes (illusion={illus}) -> {args.out}", flush=True)
|
||||
return
|
||||
@@ -822,10 +816,7 @@ def main() -> None:
|
||||
},
|
||||
"by_hero": by_hero,
|
||||
}
|
||||
args.out.write_text(
|
||||
json.dumps(payload, ensure_ascii=False, indent=2) + "\n",
|
||||
encoding="utf-8",
|
||||
)
|
||||
write_json_atomic(args.out, payload)
|
||||
time.sleep(args.delay)
|
||||
|
||||
tagged = retag_abilities(by_hero, ABILITY_TAG_OVERRIDES_MAP)
|
||||
@@ -840,11 +831,7 @@ def main() -> None:
|
||||
},
|
||||
"by_hero": by_hero,
|
||||
}
|
||||
args.out.parent.mkdir(parents=True, exist_ok=True)
|
||||
args.out.write_text(
|
||||
json.dumps(payload, ensure_ascii=False, indent=2) + "\n",
|
||||
encoding="utf-8",
|
||||
)
|
||||
write_json_atomic(args.out, payload)
|
||||
print(f"done: {len(by_hero)} heroes -> {args.out}", flush=True)
|
||||
|
||||
if args.icons:
|
||||
|
||||
Reference in New Issue
Block a user