添加Ai 简历解析

This commit is contained in:
zk
2026-04-02 16:01:08 +08:00
parent 4de721ffca
commit ff0993e431
14 changed files with 441 additions and 10 deletions
+2 -2
View File
@@ -60,9 +60,9 @@ def parse_to_text(filename: str, content: bytes) -> str:
if suffix == ".pdf":
return parse_pdf(content)
elif suffix in (".docx", ".doc"):
elif suffix == ".docx":
return parse_docx(content)
elif suffix == ".txt":
return parse_txt(content)
else:
raise ValueError(f"不支持的文件类型: {suffix},支持: .pdf, .docx, .doc, .txt")
raise ValueError(f"不支持的文件类型: {suffix},支持: .pdf, .docx, .txt")
+10
View File
@@ -0,0 +1,10 @@
"""雪花 ID 生成工具"""
from snowflake import SnowflakeGenerator
_gen = SnowflakeGenerator(1)
def next_id() -> int:
"""生成一个雪花 ID"""
return next(_gen)