Files
douyin_guaji-main/operations/__init__.py
T
CodexandClaude Opus 4.5 8fe7ff0585 refactor: 根目录核心模块迁移到 douyin/core/ 和 douyin/logging/
将 4 个根目录核心模块迁移到合理位置:
- path_config.py    -> douyin/core/path_config.py
- version.py        -> douyin/core/version.py
- Underlying_Operations.py -> douyin/core/underlying_operations.py
- unified_logger.py -> douyin/logging/unified_logger.py

配套更新所有 import:
- path_config: 41 处 import 改为 douyin.core.path_config
- version: 4 处改为 douyin.core.version
- unified_logger: 5 处改为 douyin.logging.unified_logger
- Underlying_Operations: 14 处改为 douyin.core.underlying_operations

修复 path_config.PROJECT_ROOT 计算(向上 2 级而非当前目录)。

验证:python -m compileall 全项目通过。

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-21 00:23:14 +08:00

46 lines
975 B
Python

"""底层操作模块
本目录包含从 Underlying_Operations.py 模块化后的操作模块。
"""
# 从子模块导入
from .ocr_operations import (
analyse_pic_word,
analyse_pic_digits,
extract_ocr_content,
_ensure_ocr,
)
from .screenshot_operations import (
get_screenshot,
_find_pic_path,
cut_pic,
save_reward_pic,
)
# 从原文件导入以保持向后兼容
# TODO: 逐步迁移后改为从子模块导入
from douyin.core.underlying_operations import (
_safe_replace_file,
_ensure_parent_dir,
_mirror_screenshot_to_external,
underlying_operations,
)
__all__ = [
# OCR相关
"analyse_pic_word",
"analyse_pic_digits",
"extract_ocr_content",
"_ensure_ocr",
# 截图相关
"get_screenshot",
"_find_pic_path",
"cut_pic",
"save_reward_pic",
# 其他操作
"_safe_replace_file",
"_ensure_parent_dir",
"_mirror_screenshot_to_external",
"underlying_operations",
]