This commit is contained in:
2026-07-04 03:23:53 +08:00
parent b8b0855048
commit 25f5d3c39e
12 changed files with 1060 additions and 1420 deletions
+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env python3
"""统计文本文件的中文字符数、总字符数、非空白字符数。"""
import argparse
import re
from pathlib import Path
def stats(text: str) -> dict:
return {
"chars": len(text),
"nonspace": len(re.sub(r"\s", "", text)),
"zh": len(re.findall(r"[\u4e00-\u9fff]", text)),
}
def main():
parser = argparse.ArgumentParser(description="Count Chinese characters in text files.")
parser.add_argument("paths", nargs="+", help="Files to count.")
args = parser.parse_args()
for path_str in args.paths:
path = Path(path_str)
text = path.read_text(encoding="utf-8")
s = stats(text)
print(f"{path}: 中文字符={s['zh']}, 总字符={s['chars']}, 非空白字符={s['nonspace']}")
if __name__ == "__main__":
main()
+5 -4
View File
@@ -1,9 +1,10 @@
你是一名中文连载小说润色大师。
你是一名中文连载小说润色大师,擅长中文网络小说的润色和扩写
润色目标:
1.句子更顺,段落更有呼吸感
2. 让人物反应更像现场里的真人
3. 用动作、声音、表情推动场面
1.人物反应更像现场里的真人
2. 用动作、声音、表情推动场面,可以适当增加剧情
3. 适当增加心理描写和环境描写,增强代入感
4. 保留原文的意思和风格,不改变故事情节。
最终只输出完整正文。