diff --git a/README-en.md b/README-en.md index e5da25f358b..f80b4d04e95 100644 --- a/README-en.md +++ b/README-en.md @@ -54,62 +54,6 @@ The npm version supports `debian/ubuntu/centos/alpine` systems and requires `nod npm i @whyour/qinglong ``` -## Built-in commands - -- task - -```bash -# Execute in sequence, if a random delay is set, it will be randomly delayed by a certain number of seconds -task -# Execute in sequence, regardless of whether a random delay is set, all run immediately, -# and the foreground will output the day, while recorded in the log file -task now -# Concurrent execution, regardless of whether a random delay is set, are run immediately, -# the foreground does not generate the day, directly recorded in the log file, and can be specified account execution -task conc (Optional) -# Specify the account to execute and run immediately regardless of whether a random delay is set -task desi -# Set task timeout -task -m -# Use -- to split, -- followed by a parameter that is passed to the script, as in the following example, the script receives the parameter -u whyour -p password -task -- -u whyour -p password -``` - -- ql - -```bash -# Update and restart Green Dragon -ql update -# Run custom scripts extra.sh -ql extra -# Adding a single script file -ql raw -# Add a specific script for a single repository -ql repo -# Delete old logs -ql rmlog -# Start bot -ql bot -# Detecting the Green Dragon environment and repairing it -ql check -# Reset the number of login errors -ql resetlet -# Disable two-step login -ql resettfa -``` - -| **Parameter** | **Description** | -|---|---| -| file_url | Script address | -| repo_url | Repository address | -| whitelist | The whitelist when pulling the repository, i.e., the string contained in the path of the script to be pulled | -| blacklist | Blacklisting when pulling repositories, i.e. strings that are not included in the path of the script to be pulled | -| dependence | Pulling the dependencies needed for the repository will be copied directly from the repository to the repository directory under scripts, regardless of the blacklist | -| extensions | Pull the branch of the repository | -| branch | Number of days of logs to be kept | -| days | File path for task execution | -| file_path | The name of the environment variable that needs to be concurrent or specified at the time of task execution | - ## Deployment ### Docker (Recommended) @@ -183,16 +127,72 @@ export QL_DATA_DIR="" qinglong ``` +## Built-in commands + +- task + +```bash +# Execute in sequence, if a random delay is set, it will be randomly delayed by a certain number of seconds +task +# Execute in sequence, regardless of whether a random delay is set, all run immediately, +# and the foreground will output the day, while recorded in the log file +task now +# Concurrent execution, regardless of whether a random delay is set, are run immediately, +# the foreground does not generate the day, directly recorded in the log file, and can be specified account execution +task conc (Optional) +# Specify the account to execute and run immediately regardless of whether a random delay is set +task desi +# Set task timeout +task -m +# Use -- to split, -- followed by a parameter that is passed to the script, as in the following example, the script receives the parameter -u whyour -p password +task -- -u whyour -p password +``` + +- ql + +```bash +# Update and restart Green Dragon +ql update +# Run custom scripts extra.sh +ql extra +# Adding a single script file +ql raw +# Add a specific script for a single repository +ql repo +# Delete old logs +ql rmlog +# Start bot +ql bot +# Detecting the Green Dragon environment and repairing it +ql check +# Reset the number of login errors +ql resetlet +# Disable two-step login +ql resettfa +``` + +| **Parameter** | **Description** | +|---|---| +| file_url | Script address | +| repo_url | Repository address | +| whitelist | The whitelist when pulling the repository, i.e., the string contained in the path of the script to be pulled | +| blacklist | Blacklisting when pulling repositories, i.e. strings that are not included in the path of the script to be pulled | +| dependence | Pulling the dependencies needed for the repository will be copied directly from the repository to the repository directory under scripts, regardless of the blacklist | +| extensions | Pull the branch of the repository | +| branch | Number of days of logs to be kept | +| days | File path for task execution | +| file_path | The name of the environment variable that needs to be concurrent or specified at the time of task execution | + ## Development ```bash -$ git clone https://github.com/whyour/qinglong.git -$ cd qinglong -$ cp .env.example .env +git clone https://github.com/whyour/qinglong.git +cd qinglong +cp .env.example .env # Recommended use pnpm https://pnpm.io/zh/installation -$ npm install -g pnpm@8.3.1 -$ pnpm install -$ pnpm start +npm install -g pnpm@8.3.1 +pnpm install +pnpm start ``` Open your browser and visit diff --git a/README.md b/README.md index ffccd41dede..434d01f6844 100644 --- a/README.md +++ b/README.md @@ -56,60 +56,6 @@ npm 版本支持 `debian/ubuntu/centos/alpine` 系统,需要自行安装 `node npm i @whyour/qinglong ``` -## 内置命令 - -- task - -```bash -# 依次执行,如果设置了随机延迟,将随机延迟一定秒数 -task -# 依次执行,无论是否设置了随机延迟,均立即运行,前台会输出日,同时记录在日志文件中 -task now -# 并发执行,无论是否设置了随机延迟,均立即运行,前台不产生日,直接记录在日志文件中,且可指定账号执行 -task conc (可选的) -# 指定账号执行,无论是否设置了随机延迟,均立即运行 -task desi -# 设置任务超时时间 -task -m -# 使用 -- 分割,-- 后面的参数会传给脚本,下面的例子,脚本就可接收到参数 -u whyour -p password -task -- -u whyour -p password -``` - -- ql - -```bash -# 更新并重启青龙 -ql update -# 运行自定义脚本extra.sh -ql extra -# 添加单个脚本文件 -ql raw -# 添加单个仓库的指定脚本 -ql repo -# 删除旧日志 -ql rmlog -# 启动tg-bot -ql bot -# 检测青龙环境并修复 -ql check -# 重置登录错误次数 -ql resetlet -# 禁用两步登录 -ql resettfa -``` - -| **参数** | **说明** | -|------------|---------------------------------------------------------------------------------------------| -| file_url | 脚本地址 | -| repo_url | 仓库地址 | -| whitelist | 拉取仓库时的白名单,即就是需要拉取的脚本的路径包含的字符串,多个竖线分割 | -| blacklist | 拉取仓库时的黑名单,即就是需要拉取的脚本的路径不包含的字符串,多个竖线分割 | -| dependence | 拉取仓库需要的依赖文件,会直接从仓库拷贝到scripts下的仓库目录,不受黑名单影响,多个竖线分割 | -| extensions | 拉取仓库的文件后缀,多个竖线分割 | -| branch | 拉取仓库的分支 | -| days | 需要保留的日志的天数 | -| file_path | 任务执行时的文件路径 | - ## 部署 ### docker (推荐) @@ -183,16 +129,70 @@ export QL_DATA_DIR="" qinglong ``` +## 内置命令 + +- task + +```bash +# 依次执行,如果设置了随机延迟,将随机延迟一定秒数 +task +# 依次执行,无论是否设置了随机延迟,均立即运行,前台会输出日,同时记录在日志文件中 +task now +# 并发执行,无论是否设置了随机延迟,均立即运行,前台不产生日,直接记录在日志文件中,且可指定账号执行 +task conc (可选的) +# 指定账号执行,无论是否设置了随机延迟,均立即运行 +task desi +# 设置任务超时时间 +task -m +# 使用 -- 分割,-- 后面的参数会传给脚本,下面的例子,脚本就可接收到参数 -u whyour -p password +task -- -u whyour -p password +``` + +- ql + +```bash +# 更新并重启青龙 +ql update +# 运行自定义脚本extra.sh +ql extra +# 添加单个脚本文件 +ql raw +# 添加单个仓库的指定脚本 +ql repo +# 删除旧日志 +ql rmlog +# 启动tg-bot +ql bot +# 检测青龙环境并修复 +ql check +# 重置登录错误次数 +ql resetlet +# 禁用两步登录 +ql resettfa +``` + +| **参数** | **说明** | +|------------|---------------------------------------------------------------------------------------------| +| file_url | 脚本地址 | +| repo_url | 仓库地址 | +| whitelist | 拉取仓库时的白名单,即就是需要拉取的脚本的路径包含的字符串,多个竖线分割 | +| blacklist | 拉取仓库时的黑名单,即就是需要拉取的脚本的路径不包含的字符串,多个竖线分割 | +| dependence | 拉取仓库需要的依赖文件,会直接从仓库拷贝到scripts下的仓库目录,不受黑名单影响,多个竖线分割 | +| extensions | 拉取仓库的文件后缀,多个竖线分割 | +| branch | 拉取仓库的分支 | +| days | 需要保留的日志的天数 | +| file_path | 任务执行时的文件路径 | + ## 开发 ```bash -$ git clone https://github.com/whyour/qinglong.git -$ cd qinglong -$ cp .env.example .env +git clone https://github.com/whyour/qinglong.git +cd qinglong +cp .env.example .env # 推荐使用 pnpm https://pnpm.io/zh/installation -$ npm install -g pnpm@8.3.1 -$ pnpm install -$ pnpm start +npm install -g pnpm@8.3.1 +pnpm install +pnpm start ``` 打开你的浏览器,访问