From 11e64fc7560de3cd0def718edf68c31e3dc8be72 Mon Sep 17 00:00:00 2001 From: fxqnlr Date: Wed, 4 Sep 2024 15:08:55 +0200 Subject: move stuff around, remove lib.rs for overview --- src/main.rs | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index a1f0c31..038e2f4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,12 +1,20 @@ use clap::{Parser, Subcommand}; -use modlist::{ - config::Cfg, - db::{config_get_current_list, lists_get, lists_get_all_ids}, - download, - error::MLE, - export, import, mod_add, mod_remove, update, AddMod, IDSelector, - List, Modloader, VersionLevel, -}; + +pub mod apis; +pub mod cache; +pub mod commands; +pub mod config; +pub mod db; +pub mod error; +pub mod files; +pub mod data; + +use commands::{download::download, io::{export, import}, list, modification::{mod_add, mod_remove}, update::update}; +use config::Cfg; +use data::{gameversion::VersionLevel, list::List, modification::{AddMod, IDSelector}, modloader::Modloader}; +pub use data::{STYLE_BAR_POS, STYLE_MESSAGE, STYLE_SPINNER, STYLE_BAR_BYTE, STYLE_OPERATION, PROGRESS_CHARS}; +use db::{config_get_current_list, lists_get, lists_get_all_ids}; +use error::MLE; #[derive(Parser)] #[command(author, version, about)] @@ -308,16 +316,16 @@ async fn handle_list( .unwrap(), }; - List::add(&config, &id, &ver, &ml, &directory) + list::add(&config, &id, &ver, &ml, &directory) } - ListCommands::Remove { id } => List::remove(&config, &id), - ListCommands::List => List::list(&config), - ListCommands::Change { id } => List::change(&config, &id), + ListCommands::Remove { id } => list::remove(&config, &id), + ListCommands::List => list::list(&config), + ListCommands::Change { id } => list::change(&config, &id), ListCommands::Version { id, version, download, remove, - } => List::version(&config, &id, version, download, remove).await, + } => list::version(&config, &id, version, download, remove).await, } } -- cgit v1.2.3