From 37f476ba18a7a667e3591bc336bc85d90491774f Mon Sep 17 00:00:00 2001 From: Warren Lo Date: Wed, 11 Mar 2026 01:47:07 +0800 Subject: [PATCH] Add DEVELOPMENT.md --- docs/DEVELOPMENT.md | 63 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 docs/DEVELOPMENT.md diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md new file mode 100644 index 0000000..ab11e4f --- /dev/null +++ b/docs/DEVELOPMENT.md @@ -0,0 +1,63 @@ +# Development Guide + +This document provides information for developers working on the video_probe project. + +## Prerequisites + +- Rust 1.70+ (https://rustup.rs/) +- FFmpeg/ffprobe (for probing video files) + +## Build Commands + +```bash +# Debug build +cargo build + +# Release build +cargo build --release + +# Run tests +cargo test + +# Format code +cargo fmt + +# Run linter +cargo clippy +``` + +## Project Structure + +``` +video_probe/ +├── src/ +│ ├── main.rs # CLI entry point +│ ├── lib.rs # Library interface +│ ├── error.rs # Error types +│ ├── metadata.rs # Data structures +│ ├── probe.rs # ffprobe execution +│ ├── parser.rs # JSON parsing +│ └── output.rs # Output formatting +├── docs/ +│ ├── DEVELOPMENT.md +│ ├── USAGE.md +│ └── API.md +├── Cargo.toml +└── README.md +``` + +## Code Conventions + +- Structs/Enums: PascalCase (e.g., VideoMetadata) +- Functions/Methods: snake_case (e.g., probe_video) +- Variables: snake_case (e.g., video_path) + +## Testing + +```bash +# Run all tests +cargo test + +# Run with output +cargo test -- --nocapture +``` \ No newline at end of file