mirror of
https://github.com/TG-Twilight/AWAvenue-Ads-Rule.git
synced 2025-11-04 14:49:47 +08:00
解决commits存在换行时报错 #177
Some checks failed
build Rule / execute_python_script (push) Has been cancelled
Some checks failed
build Rule / execute_python_script (push) Has been cancelled
This commit is contained in:
parent
1e3b857731
commit
8c7be33bce
3
main.py
3
main.py
@ -23,12 +23,13 @@ def WriteFile(name, text, suffix, comment, module_total): # 写入文件
|
||||
|
||||
if comment != "":
|
||||
now = datetime.now()
|
||||
commits = subprocess.check_output(['git', 'log', '-1', '--pretty=%B']).decode('utf-8').strip().replace('\n', '\\n')
|
||||
title = f"""{comment}Title: AWAvenue Ads Rule
|
||||
{comment}--------------------------------------
|
||||
{comment}Total lines: {module_total}
|
||||
{comment}Version: {get_latest_git_tag()}
|
||||
{comment}Update time: {now.strftime("%Y-%m-%d %H:%M:%S")} UTC+8
|
||||
{comment}Update content: {subprocess.check_output(['git', 'log', '-1', '--pretty=%B']).strip().decode('utf-8')}
|
||||
{comment}Update content: {commits}
|
||||
|
||||
{comment}Homepage: https://github.com/TG-Twilight/AWAvenue-Ads-Rule
|
||||
{comment}License: https://github.com/TG-Twilight/AWAvenue-Ads-Rule/blob/main/LICENSE
|
||||
|
||||
Loading…
Reference in New Issue
Block a user