chore: auto release commit (2026-09-15 00:32:44)
All checks were successful
技能自动化发布 / release (push) Successful in 7s
All checks were successful
技能自动化发布 / release (push) Successful in 7s
This commit is contained in:
@@ -66,6 +66,30 @@ def get_dispatch_dir() -> Path:
|
||||
return get_data_dir() / "dispatch"
|
||||
|
||||
|
||||
def get_logs_dir() -> Path:
|
||||
"""返回日志目录(RotatingFileHandler 默认落地点)。"""
|
||||
env_dir = os.environ.get("JIANGCHANG_LOGS_DIR")
|
||||
if env_dir:
|
||||
return Path(env_dir)
|
||||
return get_data_dir() / "logs"
|
||||
|
||||
|
||||
def get_input_dir() -> Path:
|
||||
"""返回用户主动投放的输入目录(含 contracts/*.csv + materials/*.{pdf,docx,doc})。"""
|
||||
env_dir = os.environ.get("INPUT_DIR")
|
||||
if env_dir:
|
||||
return Path(env_dir)
|
||||
return get_data_dir() / "input"
|
||||
|
||||
|
||||
def get_input_contracts_dir() -> Path:
|
||||
return get_input_dir() / "contracts"
|
||||
|
||||
|
||||
def get_input_materials_dir() -> Path:
|
||||
return get_input_dir() / "materials"
|
||||
|
||||
|
||||
def get_examples_dir() -> Path:
|
||||
"""返回样例数据目录。"""
|
||||
return get_skill_root() / "examples"
|
||||
@@ -78,5 +102,13 @@ def get_templates_dir() -> Path:
|
||||
|
||||
def ensure_dirs() -> None:
|
||||
"""确保所有需要的目录存在。"""
|
||||
for d in (get_data_dir(), get_output_dir(), get_dispatch_dir()):
|
||||
for d in (
|
||||
get_data_dir(),
|
||||
get_output_dir(),
|
||||
get_dispatch_dir(),
|
||||
get_logs_dir(),
|
||||
get_input_dir(),
|
||||
get_input_contracts_dir(),
|
||||
get_input_materials_dir(),
|
||||
):
|
||||
d.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
Reference in New Issue
Block a user