Files
auto_control/config.py
T

38 lines
1.4 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""项目根配置:只放核心程序级配置。
任务自身的参数(观看时长、点赞开关、滑动速度等)不在这里,
放各自 tasks/xxx.py 顶部,保持每个任务自包含、互不干扰。
改 STF 地址/token、adb 路径、web 端口都改这里。
"""
import os
# ================== STF 配置 ==================
STF_URL = "http://192.168.20.220:7100"
STF_TOKEN = "9024544b571647d3a6b09dab5dbfcb28bfd950f5b659400394e44e7217b7051b"
# ================== adb 路径 ==================
# adb 二进制及依赖统一放在 bin/adb/ 下
# Windows: adb.exe(依赖同目录的 dll)
# Linux: adb(需 chmod +x,Linux 版二进制)
# 代码自动识别操作系统,用户只需把对应平台的 adb 放进 bin/adb/
import sys as _sys
_ADB_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "bin", "adb")
if _sys.platform == "win32":
ADB_PATH = os.path.join(_ADB_DIR, "adb.exe")
else:
# Linux / macOS:用 bin/adb/adb(无 .exe 后缀)
# 部署后需执行 chmod +x bin/adb/adb
ADB_PATH = os.path.join(_ADB_DIR, "adb")
# ================== Web 后台 ==================
WEB_HOST = "0.0.0.0"
WEB_PORT = 5050
# ================== 数据目录 ==================
# 持久化数据(分组、任务计划)存放目录
DATA_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "data")
# APK 文件存储目录(应用管理功能)
APK_DIR = os.path.join(DATA_DIR, "apks")