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

Update utils.py #64

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update utils.py #64

wants to merge 1 commit into from

Conversation

dompling
Copy link

青龙环境下面 cmd 参数为多个的时候出现一些问题,会截取到最后一个参数如:
/cmd task jd_video.js https://api.jd.com/index.html
预想情况:jd_video+时间.log
最终情况:会生成日志 index.html+时间.log 的文件
处理方式:正则提取cmdtext的运行的脚本,然后生成日志
cmd_temp = re.findall(r"(.*).(js|py|ts|sh)",cmdtext)
if len(cmd_temp)>0:
cmd_temp = f"{cmd_temp[0][0]}.{cmd_temp[0][1]}"
cmdtext = cmd_temp

青龙环境下面 cmd 参数为多个的时候出现一些问题,会截取到最后一个参数如:
/cmd task jd_video.js https://api.jd.com/index.html
预想情况:jd_video+时间.log 
最终情况:会生成日志 index.html+时间.log 的文件
处理方式:正则提取cmdtext的运行的脚本,然后生成日志
cmd_temp = re.findall(r"(.*)\.(js|py|ts|sh)",cmdtext)
if len(cmd_temp)>0:
         cmd_temp = f"{cmd_temp[0][0]}.{cmd_temp[0][1]}"
         cmdtext = cmd_temp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant