Initial commit: yu-zhi-ran platform with automation integration

This commit is contained in:
lt
2026-04-19 14:05:09 +08:00
commit 3cb2df51c8
209 changed files with 80379 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
#!/usr/bin/env python3
"""
配置加载模块
"""
import yaml
from pathlib import Path
CONFIG_DIR = Path(__file__).parent
def load_wecom_config():
"""加载企业微信和内容配置"""
config_path = CONFIG_DIR / "wecom_config.yaml"
with open(config_path, 'r', encoding='utf-8') as f:
return yaml.safe_load(f)
def load_sources_config():
"""加载信息源配置"""
config_path = CONFIG_DIR / "sources.yaml"
with open(config_path, 'r', encoding='utf-8') as f:
return yaml.safe_load(f)
def load_app_config():
"""加载应用主配置"""
config_path = CONFIG_DIR / "app_config.yaml"
if config_path.exists():
with open(config_path, 'r', encoding='utf-8') as f:
return yaml.safe_load(f)
return {}
# 便捷导入
__all__ = ['load_wecom_config', 'load_sources_config', 'load_app_config']