mirror of https://github.com/6dylan6/jdpro.git
This commit is contained in:
parent
b7b052a9b1
commit
650b44b942
22
README.md
22
README.md
|
@ -27,7 +27,6 @@ ql repo https://github.com/6dylan6/jdpro.git "jd_|jx_|jddj_" "backUp" "^jd[^_]|U
|
|||
|
||||
线报监控类,[入口](https://github.com/6dylan6/jdm.git)
|
||||
|
||||
带图评价(PC版CK,本库也有简化版可用)[入口](https://github.com/6dylan6/auto_comment.git)
|
||||
|
||||
|
||||
## 简要流程
|
||||
|
@ -40,13 +39,12 @@ RepoFileExtensions="js py"修改为 RepoFileExtensions="js py sh" 保存;
|
|||
|
||||
3、到订阅管理创建订阅并运行;正确配置[参考](https://github.com/6dylan6/jdpro/issues/22)
|
||||
|
||||
4、订阅运行完毕,到定时任务搜索依赖安装任务执行;
|
||||
4、订阅运行完毕,到定时任务搜索依赖安装(jd_indeps.sh)任务执行,步骤2未完成会拉不到该任务;
|
||||
|
||||
4、到环境变量,创建变量,名称: JD_COOKIE,值:抓的CK(要安全就手抓),多个依次创建;
|
||||
4、到环境变量,创建变量,名称: JD_COOKIE,值:抓的CK(要安全就手抓),多个每行建一个,不要写在一个里;
|
||||
|
||||
5、配置通知,通知的key填写到配置管理config.sh文件;
|
||||
|
||||
6、sendnotify.js文件用库里的到青龙deps目录下,否则会被青龙自带覆盖
|
||||
|
||||
<details>
|
||||
<summary>笔记</summary>
|
||||
|
@ -82,9 +80,7 @@ export NOTIFY_SHOWNAMETYPE="4" 效果是 : 账号名称:备注
|
|||
|
||||
4、青龙系统通知(新增删除任务、登录等通知),需把通知变量写到config.sh文件,在环境变量里只发脚本运行通知哈。
|
||||
|
||||
5、如果通知文件发现和库里的不一致,那是被青龙自带的覆盖了,手动拷贝一份到deps目录下。
|
||||
|
||||
6、建议调整任务运行超时时间,青龙默认1小时有些跑不完就被强制结束,config.sh里配置。CommandTimeoutTime="3h" 即改为3小时,根据自己ck数量调整。
|
||||
5、建议调整任务运行超时时间,青龙默认1小时有些跑不完就被强制结束,config.sh里配置。CommandTimeoutTime="3h" 即改为3小时,根据自己ck数量调整。
|
||||
</code></pre>
|
||||
</details>
|
||||
|
||||
|
@ -102,7 +98,9 @@ Recombin_CK_Mode="3" Recombin_CK_ARG1="5" Recombin_CK_ARG2="5" 假设有100个C
|
|||
|
||||
其他用法具体参考[文档](https://docs.qq.com/doc/DTXh6QUVjRXJ1TFdN)
|
||||
|
||||
## 通用变量
|
||||
## 通用环境变量(到配置管理-config.sh里添加变量,export xxx=''格式)
|
||||
|
||||
AUTOCFG='true' 自动配置sendNotify文件到deps目录
|
||||
|
||||
代理API模式部分支持
|
||||
|
||||
|
@ -120,6 +118,14 @@ DP_POOL='http://xxx' 代理池url
|
|||
|
||||
PERMIT_JS='farm&plant&opencard' 需要走代理池的js关键词,多个&分割,必须设置
|
||||
|
||||
禁止指定的pin执行任务:
|
||||
|
||||
多个任务同pin:BANPIN='任务1|任务2@pin1,pin2'
|
||||
|
||||
多个任务不同pin:BANPIN='任务1@pin,pin2&任务2@pin2,pin3'
|
||||
|
||||
不指定任务只写pin 全部任务都不执行该pin:BANPIN='pin1,pin2'
|
||||
|
||||
|
||||
## 支持的通知方式
|
||||
|
||||
|
|
67
jd_indeps.sh
67
jd_indeps.sh
|
@ -1,39 +1,62 @@
|
|||
#!/usr/bin/env bash
|
||||
#依赖安装,运行一次就好
|
||||
#依赖安装
|
||||
#0 8 5 5 * jd_indeps.sh
|
||||
#new Env('依赖安装');
|
||||
#updatedate:20240903
|
||||
#
|
||||
|
||||
DIR="$( pwd )"
|
||||
dir_root=/ql
|
||||
dir_repo=$dir_root/repo
|
||||
dir_deps=$dir_root/deps
|
||||
|
||||
if [[ $AUTOCFG == 'true' ]];then
|
||||
if [[ -z "$(echo "$DIR"|grep 'main')" ]];then
|
||||
dir_code=$dir_log/6dylan6_jdpro_jd_sharecode
|
||||
repo='6dylan6_jdpro'
|
||||
else
|
||||
dir_code=$dir_log/6dylan6_jdpro_main_jd_sharecode
|
||||
repo='6dylan6_jdpro_main'
|
||||
fi
|
||||
[[ -d $dir_root/data ]] && dir_data=$dir_root/data
|
||||
[[ -d $dir_data/repo ]] && dir_repo=$dir_data/repo
|
||||
[[ -d $dir_data/deps ]] && dir_deps=$dir_data/deps
|
||||
cp $dir_repo/${repo}/sendNotify.js $dir_deps/ > /dev/null 2>&1
|
||||
echo -e "\n已配置sendNotify.js文件到deps目录下,再次执行订阅生效\n"
|
||||
else
|
||||
echo -e "\n如需自动配置sendNotify.js文件到desp目录下,请配置变量AUTOCFG='true'\n"
|
||||
fi
|
||||
|
||||
npm_ver=`pnpm -v|awk -F. '{print $1}'`
|
||||
if [[ $npm_ver -ge 7 ]];then
|
||||
export PNPM_HOME="/root/.local/share/pnpm"
|
||||
export PATH="$PNPM_HOME:$PATH"
|
||||
export PNPM_HOME="/root/.local/share/pnpm"
|
||||
export PATH="$PNPM_HOME:$PATH"
|
||||
fi
|
||||
|
||||
echo -e "安装脚本所需依赖,不一定一次全部安装成功,请自己检查\n"
|
||||
echo -e "安装本库所需依赖,不一定一次全部安装成功,完成请检查\n"
|
||||
echo -e "开始安装............\n"
|
||||
|
||||
#apk add g++ make pixman-dev pango-dev cairo-dev pkgconf --no-cache
|
||||
#apk add g++ make --no-cache
|
||||
pnpm config set registry https://registry.npmmirror.com
|
||||
pnpm install -g
|
||||
pnpm install -g ds
|
||||
pnpm install -g png-js
|
||||
pnpm install -g date-fns
|
||||
pnpm install -g axios
|
||||
pnpm install -g sharp@0.32.6
|
||||
pnpm install -g crypto-js
|
||||
pnpm install -g ts-md5
|
||||
pnpm install -g tslib
|
||||
pnpm install -g @types/node
|
||||
pnpm install -g request
|
||||
pnpm install -g jsdom
|
||||
pnpm install -g moment
|
||||
pnpm install -g cheerio
|
||||
pnpm install -g tough-cookie
|
||||
pnpm install -g https-proxy-agent
|
||||
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple/ jieba
|
||||
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple/ requests
|
||||
# pnpm install -g
|
||||
pnpm i -g ds@2.0.2
|
||||
pnpm i -g png-js@1.0.0
|
||||
pnpm i -g date-fns@3.6.0
|
||||
pnpm i -g axios@1.7.4
|
||||
pnpm i -g sharp@0.32.6
|
||||
pnpm i -g crypto-js@4.2.0
|
||||
# pnpm install -g ts-md5@1.3.1
|
||||
# pnpm install -g tslib@2.6.3
|
||||
# pnpm install -g @types/node@22.4.0
|
||||
pnpm i -g request@2.88.2
|
||||
pnpm i -g jsdom@24.1.1
|
||||
pnpm i -g moment@2.30.1
|
||||
pnpm i -g cheerio@1.0.0
|
||||
# pnpm install -g tough-cookie@4.1.4
|
||||
pnpm i -g https-proxy-agent@7.0.5
|
||||
pip3 i -i https://pypi.tuna.tsinghua.edu.cn/simple/ jieba
|
||||
pip3 i -i https://pypi.tuna.tsinghua.edu.cn/simple/ requests
|
||||
rm -rf /usr/local/pnpm-global/5/node_modules/.pnpm/canvas*
|
||||
rm -rf /root/.local/share/pnpm/global/5/.pnpm/canvas*
|
||||
echo -e "\n所需依赖安装完成,请检查有没有报错,可尝试再次运行"
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue