MCPcopy
hub / github.com/chinesehuazhou/python-weekly / split_bilingual_text

Function split_bilingual_text

resources/weekly_workflow.py:58–65  ·  view source on GitHub ↗

拆分 `中文---English` 形式的文本

(text)

Source from the content-addressed store, hash-verified

56 "👀 [Free Collection Download](https://pythoncat.top/posts/2025-04-20-sweekly) \n\n")
57
58def split_bilingual_text(text):
59 """拆分 `中文---English` 形式的文本"""
60 if not isinstance(text, str):
61 return text, None
62 if '---' not in text:
63 return text.strip(), None
64 chinese_text, english_text = text.split('---', 1)
65 return chinese_text.strip(), english_text.strip() or None
66
67def extract_issue_title(full_title):
68 """提取周刊标题冒号后的主题部分"""

Callers 3

split_and_generate_filesFunction · 0.85
update_readmeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected