#![deny(missing_docs)]
pub mod cli;
pub mod commands;
pub mod common;
pub mod output;
use clap::Parser;
use crate::cli::{Cli, Commands};
#[cfg(not(coverage))]
pub async fn run() -> i32 {
let cli = Cli::parse();
let json_table = !cli.json_objects;
match &cli.command {
Commands::AdhocScreen(args) => commands::adhoc_screen::handle(args, json_table).await,
Commands::Chart(args) => commands::chart::handle(args, json_table).await,
Commands::Fundamentals(args) => commands::fundamentals::handle(args, json_table).await,
Commands::Industry(args) => commands::industry::handle(args, json_table).await,
Commands::MarketData(args) => commands::market_data::handle(args, json_table).await,
Commands::Ownership(args) => commands::ownership::handle(args, json_table).await,
Commands::Ratings(args) => commands::ratings::handle(args, json_table).await,
Commands::Screen(args) => commands::screen::handle(args, json_table).await,
Commands::Tree(args) => commands::tree::handle(args, json_table).await,
Commands::Watchlist(args) => commands::watchlist::handle(args, json_table).await,
Commands::Completions(args) => {
commands::completions::handle(args);
0
}
}
}