xbot_build/tests/create_xbot_app.py
2025-09-22 21:07:30 +08:00

20 lines
589 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from datetime import datetime
import os
import sys
import uuid
# 添加项目根目录到Python路径
project_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if project_root not in sys.path:
sys.path.append(project_root)
from Xbot.XbotAppCreator import create_and_import_app, create_and_import_app_for_convert
if __name__ == "__main__":
# 使用当前时间生成应用名称格式YYYYMMDD_HHMMSS
app_name = datetime.now().strftime("%Y%m%d_%H%M")
print(f"使用时间戳作为应用名称: {app_name}")
create_and_import_app(app_name)