添加Ai 简历解析
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
"""雪花 ID 生成工具"""
|
||||
|
||||
from snowflake import SnowflakeGenerator
|
||||
|
||||
_gen = SnowflakeGenerator(1)
|
||||
|
||||
|
||||
def next_id() -> int:
|
||||
"""生成一个雪花 ID"""
|
||||
return next(_gen)
|
||||
Reference in New Issue
Block a user