diff options
author | fxqnlr <[email protected]> | 2024-09-04 15:08:55 +0200 |
---|---|---|
committer | fxqnlr <[email protected]> | 2024-09-04 15:08:55 +0200 |
commit | 11e64fc7560de3cd0def718edf68c31e3dc8be72 (patch) | |
tree | f14ad1eb3d349e1f95e4d69c251e79ac85786a64 /src/main.rs | |
parent | 7a85cf311c85ab45c75098dae58b5ebf5fef60bc (diff) | |
download | modlist-11e64fc7560de3cd0def718edf68c31e3dc8be72.tar modlist-11e64fc7560de3cd0def718edf68c31e3dc8be72.tar.gz modlist-11e64fc7560de3cd0def718edf68c31e3dc8be72.zip |
move stuff around, remove lib.rs for overview
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 34 |
1 files changed, 21 insertions, 13 deletions
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 @@ | |||
1 | use clap::{Parser, Subcommand}; | 1 | use clap::{Parser, Subcommand}; |
2 | use modlist::{ | 2 | |
3 | config::Cfg, | 3 | pub mod apis; |
4 | db::{config_get_current_list, lists_get, lists_get_all_ids}, | 4 | pub mod cache; |
5 | download, | 5 | pub mod commands; |
6 | error::MLE, | 6 | pub mod config; |
7 | export, import, mod_add, mod_remove, update, AddMod, IDSelector, | 7 | pub mod db; |
8 | List, Modloader, VersionLevel, | 8 | pub mod error; |
9 | }; | 9 | pub mod files; |
10 | pub mod data; | ||
11 | |||
12 | use commands::{download::download, io::{export, import}, list, modification::{mod_add, mod_remove}, update::update}; | ||
13 | use config::Cfg; | ||
14 | use data::{gameversion::VersionLevel, list::List, modification::{AddMod, IDSelector}, modloader::Modloader}; | ||
15 | pub use data::{STYLE_BAR_POS, STYLE_MESSAGE, STYLE_SPINNER, STYLE_BAR_BYTE, STYLE_OPERATION, PROGRESS_CHARS}; | ||
16 | use db::{config_get_current_list, lists_get, lists_get_all_ids}; | ||
17 | use error::MLE; | ||
10 | 18 | ||
11 | #[derive(Parser)] | 19 | #[derive(Parser)] |
12 | #[command(author, version, about)] | 20 | #[command(author, version, about)] |
@@ -308,16 +316,16 @@ async fn handle_list( | |||
308 | .unwrap(), | 316 | .unwrap(), |
309 | }; | 317 | }; |
310 | 318 | ||
311 | List::add(&config, &id, &ver, &ml, &directory) | 319 | list::add(&config, &id, &ver, &ml, &directory) |
312 | } | 320 | } |
313 | ListCommands::Remove { id } => List::remove(&config, &id), | 321 | ListCommands::Remove { id } => list::remove(&config, &id), |
314 | ListCommands::List => List::list(&config), | 322 | ListCommands::List => list::list(&config), |
315 | ListCommands::Change { id } => List::change(&config, &id), | 323 | ListCommands::Change { id } => list::change(&config, &id), |
316 | ListCommands::Version { | 324 | ListCommands::Version { |
317 | id, | 325 | id, |
318 | version, | 326 | version, |
319 | download, | 327 | download, |
320 | remove, | 328 | remove, |
321 | } => List::version(&config, &id, version, download, remove).await, | 329 | } => list::version(&config, &id, version, download, remove).await, |
322 | } | 330 | } |
323 | } | 331 | } |