(script_directory, lang_code="")
| 14 | |
| 15 | |
| 16 | def get_new_content(script_directory, lang_code=""): |
| 17 | with open(NEW_CONTENT_PATH, 'r', encoding='utf-8') as file: |
| 18 | content = file.read() |
| 19 | new_content = format_str(content, lang_code) |
| 20 | # 判断目录下的passed.json |
| 21 | if os.path.exists(script_directory + "/docs/passed.json"): |
| 22 | URL = f"https://github.com/{get_repo_name()}/raw/main/{script_directory}/docs/passed.json" |
| 23 | else: |
| 24 | URL = f"https://github.com/{get_repo_name()}/raw/main/docs/passed.json" |
| 25 | new_content = new_content.format( |
| 26 | PASSED_URL=URL |
| 27 | ) |
| 28 | return new_content |
| 29 | |
| 30 | |
| 31 | def main(): |
no test coverage detected