2023-10-18 23:26:04 +00:00
|
|
|
use std::process::ExitCode;
|
|
|
|
|
2023-10-18 23:47:05 +00:00
|
|
|
use clap::Parser;
|
|
|
|
|
|
|
|
use self::cli::parameters::Cli;
|
|
|
|
use self::cli::parameters::Commands;
|
|
|
|
mod cli;
|
2023-10-18 23:54:18 +00:00
|
|
|
mod command;
|
2023-10-18 23:59:45 +00:00
|
|
|
mod config;
|
2023-10-18 23:47:05 +00:00
|
|
|
|
2023-10-18 23:26:04 +00:00
|
|
|
fn main() -> Result<ExitCode, Box<dyn std::error::Error>> {
|
|
|
|
let rt = tokio::runtime::Runtime::new()?;
|
|
|
|
rt.block_on(async {
|
|
|
|
let main_body_result = main_body().await;
|
|
|
|
main_body_result
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
async fn main_body() -> Result<ExitCode, Box<dyn std::error::Error>> {
|
|
|
|
let args = Cli::parse();
|
|
|
|
match args.command {
|
|
|
|
Commands::Init(_args) => {}
|
|
|
|
Commands::Build(_args) => {}
|
|
|
|
Commands::AddPost(_args) => {}
|
|
|
|
};
|
|
|
|
Ok(ExitCode::SUCCESS)
|
|
|
|
}
|