- 下載
config.yml
並修改設定 - 執行以下命令
docker run --rm -v "$(pwd)/config.yml:/config.yml" jacoblincool/bahamut-automation
# --rm: 容器執行完就自動刪除
# -v: 將主機目前目錄下的 `config.yml` 掛載至容器的 `/config.yml`
# 你可以改成任何主機上指向設定檔的位置,但要掛在 `/config.yml` 上
如何使用? | |
1. 安裝 Docker Desktop: https://www.docker.com/products/docker-desktop/ | |
2. 看 README.md |
--- | |
# 所有模組皆可存取的共用參數 | |
shared: | |
shared_key: shared_val | |
# 使用的模組及其參數,可以是內建的模組或是自製模組的路徑 | |
modules: | |
# 註冊一些通用函式到 shared | |
utils: | |
report: | |
ad_handler: | |
# 主要功能模組 | |
login: | |
username: string # 使用者名稱 | |
password: string # 密碼 | |
sign: | |
guild: | |
answer: | |
lottery: | |
max_attempts: 20 | |
logout: | |
# 以下是寄報告的部分 | |
telegram: | |
channel: telegram_channel_id | |
discord: | |
webhook: discord_webhook_url | |
line_notify: | |
token: line_token | |
issue: | |
# 自製模組(範例) | |
/path/to/module: | |
param1: value1 | |
param2: value2 | |
# 瀏覽器的設定 | |
browser: | |
type: firefox | |
headless: true | |
firefoxUserPrefs: | |
dom.webaudio.enabled: false | |
media.volume_scale: 0 | |
media.default_volume: 0 | |
# 如果要使用非內建的瀏覽器執行,請設定 executablePath | |
# executablePath: /path/to/browser | |
# 更多設定請查閱:https://playwright.dev/docs/api/class-browsertype#browser-type-launch |