Skip to content
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

use new plugin #9

Merged
merged 1 commit into from
Dec 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions docs/project/hydro.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,29 @@ LANG=zh . <(curl https://hydro.ac/setup.sh)

使 Hydro 接入洛谷开放平台,您需要进行以下操作:

1. 使用 `hydrooj install @hydrooj/vjudge` 安装 vjudge 插件(如果之前已安装请跳过该步骤)
2. 使用 `hydrooj install https://cdn.luogu.com.cn/lgapi/hydro/hydroplugin-luogu-latest.tgz` 安装题库导入工具
3. 使用 `hydrooj cli luogu importProblem` 导入题库
4. 使用 `hydrooj cli luogu addAccount <token>` 设置账号
5. 重启 Hydro 进程(`pm2 restart hydrooj`)
1. 使用 `hydrooj install https://hydro.ac/hydroac-client.zip` 安装最新的远端评测和题库导入工具。
2. 重启 Hydro 进程(`pm2 restart hydrooj`)
3. 使用管理员账号登录,前往 控制面板 -> 脚本管理 页面,找到 `luogu-import-problem` 脚本,运行,参数可留空,也可参照下方更多信息
4. 前往 控制面板->洛谷RemoteJudge管理,购买或填写账号信息
5. 设置完成后再次重启 Hydro 进程。
6. 大功告成!

如果需要帮助部署/迁移或有二次开发的需求,您可联系 Hydro 开发者寻求帮助。

## 题库导入参数

```json
{"path":"","domainId":"luogu","prefix":""}
```

JSON 格式;

`path` 为本地的题目包路径,留空则自动下载。
`domainId` 为导入的目标域,若希望导入默认域则填写 system
`prefix` 为导入题目时添加的题号前缀,留空则保持原题号。

若日后需要更新题目列表则再次运行该导入功能即可。

- Hydro 仓库地址:https://github.com/hydro-dev/hydro
- Hydro 文档:https://hydro.js.org (镜像:https://docs.hydro.ac)
- 洛谷 vjudge 插件仓库地址:https://github.com/hydro-dev/luogu