We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a4a4465 commit d1dc58dCopy full SHA for d1dc58d
1 file changed
utils/fix_toc.py
@@ -1,7 +1,8 @@
1
import re
2
+import sys
3
4
from content_snippet import get_file_description
-from helper import is_file_modified, read_json
5
+from helper import is_file_modified, is_file_updated_more_than, read_json
6
from writer import process_file
7
8
start_tag = "<!--SCRIPTS_COUNT-->"
@@ -19,6 +20,10 @@
19
20
return_link_template = '<div align="right"><a href="{}">{}</a></div>'
21
readme_toc_template = "({})"
22
23
+if is_file_updated_more_than("docs/README.md", 15):
24
+ print("[SKIP] README.md 没有新提交,跳过处理TOC。")
25
+ sys.exit(0)
26
+
27
docs = read_json("utils/docs/translate_readme.json")
28
29
0 commit comments