--- title: MROTemp 项目概览 type: curated permalink: main/projects/991bd0b4-6f60-47c0-8e47-1bb256c04653/curated/mrotemp-项目概览 stable_id: 168cdd47-5b20-4ce0-ab8a-c608a2015d0a scope: project project_id: 991bd0b4-6f60-47c0-8e47-1bb256c04653 workspace_type: development usage_profile_id: null preference_context: development document_type: overview revision: 1 source_memory_ids: [] source_checkpoint_ids: [] source_file_ids: [] source_git_commit: null source_git_commits: [] source_agent_sync_ids: [] model_connection: Sub2API model_name: git-restore source_count: 20 source_revisions: memory:09d9ff03-0cbd-4551-9b74-f5953855e4a3: '1' memory:239b53ab-c40a-4c6f-978f-f5e97d45f49f: '1' source_dispositions: processed: 20 unchanged: 0 unsupported: 0 skipped: 0 cited_source_ids: - curated_baseline:168cdd47-5b20-4ce0-ab8a-c608a2015d0a - project:991bd0b4-6f60-47c0-8e47-1bb256c04653 - memory:09d9ff03-0cbd-4551-9b74-f5953855e4a3 - memory:239b53ab-c40a-4c6f-978f-f5e97d45f49f job_cited_source_ids: [] conflicts: [] supersedes: [] preferences: - statement: 使用最简单且正确的实现(KISS & YAGNI)。 level: scenario workspace_types: - development workspace_ids: [] source_ids: - global_guidance_document:2b47472d-3ac2-4394-8646-c6bf1c0fc270 counterexample_source_ids: [] occurrence_count: 1 explicit: true confidence: 1.0 status: current - statement: 复用项目已有的框架、服务、工具和约定,避免重复实现。 level: scenario workspace_types: - development workspace_ids: [] source_ids: - global_guidance_document:2b47472d-3ac2-4394-8646-c6bf1c0fc270 counterexample_source_ids: [] occurrence_count: 1 explicit: true confidence: 1.0 status: current - statement: 不添加仅为假设未来需求而设计的依赖或抽象层。 level: scenario workspace_types: - development workspace_ids: [] source_ids: - global_guidance_document:2b47472d-3ac2-4394-8646-c6bf1c0fc270 counterexample_source_ids: [] occurrence_count: 1 explicit: true confidence: 1.0 status: current - statement: 在任何登录、SSH、数据库或 API 调用前先查询 Vaultwarden;若唯一匹配直接使用。 level: scenario workspace_types: - development workspace_ids: [] source_ids: - global_guidance_memory:105b328f-4bda-4641-90a7-7282ef156316 counterexample_source_ids: [] occurrence_count: 1 explicit: true confidence: 1.0 status: current - statement: 新建或修改的账号、密码、Token、API 密钥和 TOTP 种子必须立即写入密码库。 level: scenario workspace_types: - development workspace_ids: [] source_ids: - global_guidance_memory:105b328f-4bda-4641-90a7-7282ef156316 counterexample_source_ids: [] occurrence_count: 1 explicit: true confidence: 1.0 status: current - statement: 默认使用中文沟通,除非明确要求其他语言。 level: scenario workspace_types: - development workspace_ids: [] source_ids: - global_guidance_document:6973450e-6ecc-48e3-8cdd-4d7d7707d843 counterexample_source_ids: [] occurrence_count: 1 explicit: true confidence: 1.0 status: current - statement: 开发环境为 Windows,所有路径、命令和验证方式须兼容 Windows。 level: scenario workspace_types: - development workspace_ids: [] source_ids: - global_guidance_document:6973450e-6ecc-48e3-8cdd-4d7d7707d843 counterexample_source_ids: [] occurrence_count: 1 explicit: true confidence: 1.0 status: current - statement: AI 驱动的记忆整理与 Git‑based 记忆同步默认关闭。 level: scenario workspace_types: - development workspace_ids: [] source_ids: - global_guidance_memory:3f91189b-11a1-45bb-8357-4f413dc1609d counterexample_source_ids: [] occurrence_count: 1 explicit: true confidence: 1.0 status: current source_cursor: 53 source_hash: cd96d5b27b5d1ef34ff30350e40c12b9d9b7e389c5813755521578d1f2597d9c prompt_version: 2026-08-12.3 schema_version: '3' curation_job_id: null created_at: '2026-08-13T03:10:47.814877+00:00' updated_at: '2026-09-23T15:02:43.615859+00:00' tags: - 概览 - 项目 - 开发原则 - Windows - GBK restored_from_commit: 6a6a895eafcca6052e81a14fca103a42635dd1c2 --- ## 项目概述 MROTemp 是一个用于批量将 ZTE LTE MRO XML 文件转换为 GBK 编码 CSV 的 **development** 工作区。项目根目录位于 `e:\\Data\\Users\\Administrator\\Downloads\\MROTemp`,已创建 Python 虚拟环境 `.venv` 并安装 `lxml==6.1.1`。 ### 目录结构 - `source/` – 放置待处理的 XML 文件。 - `output/` – 脚本生成的 CSV 文件,文件名形式 `MRO_.csv`,采用 GBK 编码。 - `aidocs/` – 本地项目记忆 (`project_context.md`),不提交到 Git,记录开发日志。 - `mro_to_csv.py` – 主转换脚本,仅提取 **第一个 measurement**,在解析到第二个时停止。 ### 关键实现要点 - **字段**:`FileName, eNB, id, MmeUeS1apId, MmeCode, MmeGroupId, TimeStamp` + 31 个去除 `MR.` 前缀的业务字段。 - **编码**:GBK,兼容 Windows 中文控制台。 - **执行方式**:在 Windows 命令行激活虚拟环境后运行 `.venv\\Scripts\\python.exe mro_to_csv.py`。 - **验证**:使用样例文件 `FDD-LTE_MRO_ZTE_OMC1_854879_20260813000000.xml` 成功生成 8589 行 CSV,首行/尾行分别对应 XML 中相应字段。 > **注意**:脚本默认只处理第一个 measurement,除非用户明确要求导出全部 measurement(`--all-measurements`)。 ### 适用原则 - **KISS & YAGNI**:实现保持最简且正确,未添加仅为假设需求的依赖或抽象。 *(来源 `memory:bf88c265-4749-4c50-85bc-4bae25298cd5`)* - **复用现有框架**:仅使用已配置的 `.venv` 与 `lxml`,不额外引入库。 *(同上)* - **AI 与 Git 集成**:默认禁用,除非显式配置。 *(来源 `memory:3f91189b-11a1-45bb-8357-4f413dc1609d`)* - **凭证管理**:所有登录、SSH、API 调用前先查询 Vaultwarden,唯一匹配直接使用;新凭证立即写入密码库。 *(来源 `memory:105b328f-4bda-4641-90a7-7282ef156316`)* - **语言与平台**:默认使用中文沟通,所有路径、命令均在 Windows 环境下可执行。 *(来源 `memory:6973450e-6ecc-48e3-8cdd-4d7d7707d843`)* ### 记忆与提交工作流 - 项目记忆存放于 `aidocs/project_context.md`,顶部为固定说明,随后按 **最新优先**、秒级时间戳追加条目。 *(来源 `memory:5ed86f53-b53e-4534-8e51-d3a010069d5e`)* - 完成任务后:清理临时文件 → 更新记忆 → 检查工作树 → 使用 `type: 中文说明` 格式提交有意义的改动。 ### 标签 - 项目概览 - 开发原则 - Windows - GBK - 记忆工作流