Skip to content

Commit a4909b1

Browse files
authored
refactor: make CSV export default, consolidate instruction files (#3)
* refactor: make CSV export default, consolidate instruction files - Remove --csv flag (CSV export always enabled for CLI binary) - Update help text to clarify CSV is default output format - Delete outdated .github/instructions/rust-project.instructions.md - AGENTS.md is now single source of truth for project instructions BREAKING CHANGE: --csv flag removed, CSV export is now always enabled * refactor: remove empty conditional block after CSV export for clarity
1 parent 3c6ba5f commit a4909b1

2 files changed

Lines changed: 3 additions & 63 deletions

File tree

.github/instructions/rust-project.instructions.md

Lines changed: 0 additions & 48 deletions
This file was deleted.

src/main.rs

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ impl CsvFieldMap {
261261
fn build_command() -> Command {
262262
Command::new("BBL Parser")
263263
.version(env!("CARGO_PKG_VERSION"))
264-
.about("Read and parse BBL blackbox log files. Output to various formats.")
264+
.about("Read and parse BBL blackbox log files. Exports to CSV by default (optionally GPX/JSON).")
265265
.arg(
266266
Arg::new("files")
267267
.help("BBL files to parse (.BBL, .BFL, .TXT extensions supported, case-insensitive, supports globbing)")
@@ -275,16 +275,10 @@ fn build_command() -> Command {
275275
.help("Enable debug output and detailed parsing information")
276276
.action(clap::ArgAction::SetTrue),
277277
)
278-
.arg(
279-
Arg::new("csv")
280-
.long("csv")
281-
.help("Export decoded frame data to CSV files (creates .XX.csv for flight data and .XX.headers.csv for plaintext headers)")
282-
.action(clap::ArgAction::SetTrue),
283-
)
284278
.arg(
285279
Arg::new("output-dir")
286280
.long("output-dir")
287-
.help("Directory for CSV output files (default: same as input file)")
281+
.help("Directory for output files (default: same as input file)")
288282
.value_name("DIR"),
289283
)
290284
.arg(
@@ -317,7 +311,6 @@ fn main() -> Result<()> {
317311
let matches = build_command().get_matches();
318312

319313
let debug = matches.get_flag("debug");
320-
let export_csv = matches.get_flag("csv");
321314
let export_gpx = matches.get_flag("gpx") || matches.get_flag("gps");
322315
let export_event = matches.get_flag("event");
323316
let force_export = matches.get_flag("force-export");
@@ -335,7 +328,7 @@ fn main() -> Result<()> {
335328
};
336329

337330
let export_options = ExportOptions {
338-
csv: export_csv,
331+
csv: true, // CSV export is always enabled for the CLI binary
339332
gpx: export_gpx,
340333
event: export_event,
341334
output_dir: output_dir.clone(),
@@ -468,11 +461,6 @@ fn main() -> Result<()> {
468461
std::process::exit(1);
469462
}
470463

471-
// Inform user when no output files were created due to missing --csv flag
472-
if processed_files > 0 && !export_csv && !export_gpx && !export_event {
473-
println!("\nNote: No output files were created. Use --csv to export data to CSV files.");
474-
}
475-
476464
Ok(())
477465
}
478466

0 commit comments

Comments
 (0)