X-Git-Url: https://git.r.bdr.sh/rbdr/blog/blobdiff_plain/5f81d796fed4e4efbaf6dbed7d3c69481afddeb3..6352ebb0eb4cb83240c6d4998e0ef1375b041191:/src/main.rs?ds=sidebyside diff --git a/src/main.rs b/src/main.rs index bf1e184..a0a9fef 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,13 +1,23 @@ // mod argument_parser; mod configuration; mod command; +mod constants; +mod gemini_parser; +mod generator; +mod archiver; +mod metadata; +mod post; +mod template; +mod utils; use std::iter::once; use std::env::args; use std::io::Result; use command::{available_commands, Command, help::Help}; +use configuration::Configuration; fn main() -> Result<()> { + let configuration = Configuration::new(); let commands = available_commands(); let arguments: Vec = args().collect(); @@ -23,7 +33,7 @@ fn main() -> Result<()> { .collect(); for command in command_chain { - let result = command.execute(arguments.get(2)); + let result = command.execute(arguments.get(2), &configuration, command_name); if let Err(_) = result { return result; } @@ -33,5 +43,5 @@ fn main() -> Result<()> { } } - Help::new().execute(None) + Help::new().execute(None, &configuration, &"help".to_string()) }