use anyhow::Result;
use clap::{Parser, Subcommand};
mod bloom;
mod common;
mod export;
mod index;
mod info;
mod layout;
mod stats;
#[derive(Parser)]
#[command(name = "orc")]
#[command(author, version, about = "ORC file inspection and export tool", long_about = None)]
struct Cli {
#[command(subcommand)]
command: Commands,
}
#[derive(Subcommand)]
enum Commands {
Info(info::Args),
Export(export::Args),
Stats(stats::Args),
Layout(layout::Args),
Index(index::Args),
Bloom(bloom::Args),
}
fn main() -> Result<()> {
let cli = Cli::parse();
match cli.command {
Commands::Info(args) => info::run(args),
Commands::Export(args) => export::run(args),
Commands::Stats(args) => stats::run(args),
Commands::Layout(args) => layout::run(args),
Commands::Index(args) => index::run(args),
Commands::Bloom(args) => bloom::run(args),
}
}