summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorNamilskyy <alive6863@gmail.com>2025-03-26 14:49:15 +0300
committerNamilskyy <alive6863@gmail.com>2025-03-26 14:49:15 +0300
commitc214e1c59e54b895e32c332afc6bb8e897b01d0e (patch)
tree449c7c4c4ed02c72469a7bd22b3cb1bc3b8b133c /src/main.rs
parente687e9bd48ce383894fd499595fc25c2dd8ca024 (diff)
Fixing errs
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs34
1 files changed, 25 insertions, 9 deletions
diff --git a/src/main.rs b/src/main.rs
index 4f15b56..9f64ca4 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,10 +1,14 @@
-use clap::{Arg, Command};
-use termimage;
+extern crate image;
+
+
+use clap::{Arg, Command};
+use termimage::{Options};
+
mod configmanager;
mod parser;
-use configmanager::{Config, handle_config};
+use crate::configmanager::{Config, handle_config};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let matches = Command::new("WeatherFetch")
@@ -19,11 +23,11 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.arg(Arg::new("lon").short('n').long("lon").value_name("LONGITUDE"))
.get_matches();
- if matches.contains_id("help") {
- println!("Usage: ...");
- return Ok(());
- }
-
+ if matches.contains_id("help") {
+ println!("Usage: ...");
+ return Ok(());
+ }
+
if let Some(img_path) = matches.get_one::<String>("image") {
let _img = Image::from_path(img_path)?;
}
@@ -31,5 +35,17 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let config = Config::load()?;
handle_config(&config)?;
+
+ let opts = Options::parse();
+ /*
+ if !opts {
+ opts = configmanager::Config::load();
+ }
+
+ let format = ops::guess_format(&opts.image)?;
+ let img = ops::load_image(&opts.image, format)?;
+
+ */
+
Ok(())
-} \ No newline at end of file
+}