Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
!OVERVIEW.md
!GOALS.md
!FRAMES.md
!build.rs
!Cargo.*
!.gitignore
!LICENSE
Expand Down
82 changes: 82 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ keywords = ["betaflight", "blackbox", "drone", "flight-log", "parser"]
categories = ["parsing", "aerospace"]
rust-version = "1.70.0"

[build-dependencies]
anyhow = "1.0"
vergen = { version = "8", features = ["git", "gitcl"] }

[dependencies]
anyhow = "1.0"
clap = { version = "4.0", features = ["derive"], optional = true }
Expand Down
9 changes: 1 addition & 8 deletions OVERVIEW.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# BBL Parser v0.9.0 - Project Overview
# BBL Parser - Project Overview

**Project Status:** 🚧 **WORK IN PROGRESS**
**Version:** 0.9.0
**Focus:** High-Performance BBL Processing
**⚠️ Not Production Ready**

Expand Down Expand Up @@ -281,9 +280,3 @@ Exported event data to: BTFL_BLACKBOX_LOG_20250601_121852.event
- **Performance** adequate but not optimized
- **Error handling** basic with room for improvement
- **API stability** documented with migration notes

---

**Current Focus:** Core functionality development and testing
**Version:** 0.9.0 🚧 Work-in-Progress
**⚠️ Not recommended for production use**
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# BBL Parser (Work-in-Progress)
# BBL Parser

A fast, pure-Rust Blackbox Log parser primarily used as a command-line tool, with an optional Rust crate API.

Expand Down
10 changes: 10 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
use anyhow::Result;
use vergen::EmitBuilder;

fn main() -> Result<()> {
EmitBuilder::builder()
.git_sha(true)
.git_commit_date()
.emit()?;
Ok(())
}
23 changes: 20 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ use bbl_parser::types::{FrameDefinition, FrameStats};
// Import ExportOptions from crate library
use bbl_parser::ExportOptions;

// Include vergen generated environment variables
const GIT_SHA: &str = env!("VERGEN_GIT_SHA", "unknown");
const GIT_COMMIT_DATE: &str = env!("VERGEN_GIT_COMMIT_DATE", "unknown");

// Build version string from git info
const VERSION_STR: &str = concat!(
env!("VERGEN_GIT_SHA", "unknown"),
" (",
env!("VERGEN_GIT_COMMIT_DATE", "unknown"),
")"
);

/// Maximum recursion depth to prevent stack overflow
const MAX_RECURSION_DEPTH: usize = 100;

Expand Down Expand Up @@ -326,9 +338,14 @@ impl CsvFieldMap {
}

fn build_command() -> Command {
Command::new("BBL Parser")
.version(env!("CARGO_PKG_VERSION"))
.about("Read and parse BBL blackbox log files. Exports to CSV by default (optionally GPX/JSON).")
let about_text = format!(
"\n\nRead and parse BBL blackbox log files. Exports to CSV by default (optionally GPX/JSON).\n {} {} ({})",
env!("CARGO_PKG_NAME"), GIT_SHA, GIT_COMMIT_DATE
);

Command::new(env!("CARGO_PKG_NAME"))
.version(VERSION_STR)
.about(about_text)
.arg(
Arg::new("files")
.help("BBL files or directories to parse. Direct file paths: .BBL, .BFL, .TXT extensions supported. Directories: recursively finds .BBL/.BFL files only (TXT files must be specified directly). Case-insensitive, supports globbing.")
Expand Down