mod args;
mod commands {
automod::dir!(pub "src/commands");
}
mod util;
use clap::{Parser, Subcommand};
#[derive(Parser)]
#[command(name = "eure", about = "Eure file utilities")]
struct Cli {
#[command(subcommand)]
command: Commands,
}
#[derive(Subcommand)]
enum Commands {
Inspect(commands::inspect::Args),
Unformat(commands::unformat::Args),
Fmt(commands::fmt::Args),
ToJson(commands::to_json::Args),
FromJson(commands::from_json::Args),
FromToml(commands::from_toml::Args),
Highlight(commands::highlight::Args),
Html(commands::html::Args),
Check(commands::check::Args),
Mark(commands::mark::Args),
Cache(commands::cache::Args),
}
fn main() {
let cli = Cli::parse();
match cli.command {
Commands::Inspect(args) => commands::inspect::run(args),
Commands::Unformat(args) => commands::unformat::run(args),
Commands::Fmt(args) => commands::fmt::run(args),
Commands::ToJson(args) => commands::to_json::run(args),
Commands::FromJson(args) => commands::from_json::run(args),
Commands::FromToml(args) => commands::from_toml::run(args),
Commands::Highlight(args) => commands::highlight::run(args),
Commands::Html(args) => commands::html::run(args),
Commands::Check(args) => commands::check::run(args),
Commands::Mark(args) => commands::mark::run(args),
Commands::Cache(args) => commands::cache::run(args),
}
}