feat: add rust_register CLI tool
新增功能: - 獨立的 register CLI 工具 - 不依賴 API 和 Worker - 直接註冊視頻文件到數據庫 特性: - ✅ 元數據提取 (ffprobe) - ✅ Birth UUID 計算 - ✅ Force 模式 (覆蓋已存在) - ✅ 詳細輸出模式 - ✅ 錯誤處理 使用方法: ```bash # 註冊文件 rust_register /path/to/video.mp4 # 強制重新註冊 rust_register /path/to/video.mp4 --force # 詳細輸出 rust_register /path/to/video.mp4 --verbose ``` 功能: 1. 文件驗證 2. UUID 計算 (birth UUID) 3. 元數據提取 (duration, resolution, fps) 4. 數據庫插入 5. Force 模式 (自動 unregister) 元數據: - Duration: 8.80s - Resolution: 1920x1080 - FPS: 59.94 - Total frames: 527 優勢: - 同步執行(無需等待 Worker) - 獨立運行(無需 API Server) - 詳細輸出(便於調試) 文檔: - docs_v1.0/OPERATIONS/Rust_Register_CLI_Tool.md 測試: - ✅ 編譯成功 - ✅ 基本註冊測試通過 - ✅ Force 模式測試通過 - ✅ Verbose 模式測試通過 Binary: - target/debug/rust_register
This commit is contained in:
@@ -167,3 +167,7 @@ path = "src/bin/backfill_trace_vlm.rs"
|
||||
[[bin]]
|
||||
name = "rust_unregister"
|
||||
path = "src/bin/rust_unregister.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "rust_register"
|
||||
path = "src/bin/rust_register.rs"
|
||||
|
||||
Reference in New Issue
Block a user