#!/usr/bin/env python3 """ 共享工具模块 负责导入IT资讯自动化项目的公共模块 """ import sys import os # 将IT资讯项目路径加入Python路径 IT_AUTO_PATH = "/home/ubuntu/nanocode/it_automation_enhanced/scripts" if IT_AUTO_PATH not in sys.path: sys.path.insert(0, IT_AUTO_PATH) def get_xiaohongshu_publisher(): """ 获取小红书发布器(共享模块) """ try: from xiaohongshu_multi_image import XiaohongshuMultiImagePublisher return XiaohongshuMultiImagePublisher except ImportError as e: raise ImportError(f"无法加载共享发布模块: {e}") def get_anti_ai_humanizer(): """ 获取去AI化处理器(共享模块) """ try: sys.path.insert(0, "/home/ubuntu/.nanobot/workspace/skills/anti-ai-detector") from humanize import humanize_text return humanize_text except ImportError: return None