Repository navigation
feat(okww): 支持自定义启动参数 #1968
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
AthenaHibou
merged 3 commits into
AUTO-MAS-Project:dev
from
AthenaHibou:feat/okww-custom-arguments
Nov 13, 2026
Merged
feat(okww): 支持自定义启动参数 #1968
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| """OK-WW 普通模式启动参数。""" | ||
|
|
||
| import json | ||
| from pathlib import Path | ||
|
|
||
| from packaging.version import InvalidVersion, Version | ||
|
|
||
| from app.task.proxy_helpers import split_args | ||
|
|
||
|
|
||
| def build_custom_arguments(arguments: str) -> list[str]: | ||
| """按原样拆分用户参数,不补充或替换选项。""" | ||
| return split_args(arguments) | ||
|
|
||
|
|
||
| def daily_task_argument(script_root: Path) -> str: | ||
| """按已安装版本选择上游支持的日常任务参数。""" | ||
| app_config = json.loads( | ||
| (script_root / "data/apps/ok-ww/app.json").read_text(encoding="utf-8-sig") | ||
| ) | ||
| if not isinstance(app_config, dict): | ||
| raise ValueError("OK-WW 启动器配置格式错误,请先在脚本启动器中完成安装或更新") | ||
| raw_version = app_config.get("current_version") | ||
| try: | ||
| version = Version(str(raw_version)) | ||
| except InvalidVersion as exc: | ||
| raise ValueError( | ||
| "无法识别 OK-WW 当前版本,请先在脚本启动器中完成安装或更新" | ||
| ) from exc | ||
| # 上游 f09ac771(ok-script 2.0.7b1);首个含此变更的预发布 tag。 | ||
| return "DailyTask" if version >= Version("3.6.7b2") else "1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| project: okww | ||
| 支持为账号自定义启动参数 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.