ba-auto-daily/ba_daily.py
Nik Afiq 0707487934 Enhance automation project with story sweep feature and OCR policy updates
- Introduced `story_sweep.py` for Normal/Hard story AP sweeping, allowing users to spend AP on randomly selected stages.
- Updated `CLAUDE.md` to clarify the OCR policy, emphasizing the need to port OCR-driven logic from the reference implementation rather than substituting with non-OCR methods.
- Modified `README.md` and `plan.md` to reflect the new story sweep feature and its operational details.
- Adjusted `setup.sh` to include the new command for running the story sweep.
- Enhanced `driver.py` with a new scroll function for better interaction with the game UI.
- Updated configuration mappings in `config.py` to support the new story sweep functionality.
- Refined existing task modules to ensure consistent state verification and error handling.
2026-07-05 20:19:35 +09:00

40 lines
1022 B
Python

#!/usr/bin/env python3
"""Python CLI entry point: ba_dailies.sh -> ba_daily.py -> ba_auto/tasks/*.py"""
import sys
from ba_auto import config, driver
from ba_auto.tasks import cafe, mailbox, stamina, story_sweep
TASKS = {
"mailbox": mailbox.run,
"cafe": cafe.run,
"stamina": stamina.run,
"story_sweep": story_sweep.run,
}
# story_sweep is opt-in only (not in the default flow): it spends AP on a
# randomly-picked stage rather than reclaiming something free, which is a
# real resource decision the default unattended run shouldn't make blindly.
DEFAULT_ORDER = ["mailbox", "cafe", "stamina"]
def main(argv):
args = argv[1:]
if not args:
for name in DEFAULT_ORDER:
TASKS[name](driver, config)
print("All done.")
return 0
command = args[0]
if command not in TASKS:
print(f"Unknown phase: {command}", file=sys.stderr)
return 1
TASKS[command](driver, config)
return 0
if __name__ == "__main__":
sys.exit(main(sys.argv))