Move arg parsing to the CLI client
This commit is contained in:
parent
5207826108
commit
6ec3f84a93
@ -19,7 +19,6 @@ serde_json = "1.0.145"
|
||||
slint = { version = "1.14.1", default-features = false, features = ["backend-winit", "renderer-software", "compat-1-2"]}
|
||||
toml = "0.9.8"
|
||||
popcorn-conf = { path = "../popcorn-conf" }
|
||||
clap = { version = "4.5.53", features = ["derive"] }
|
||||
serde = { version = "1.0.228", features = ["derive"] }
|
||||
|
||||
[build-dependencies]
|
||||
|
||||
@ -1,13 +1,7 @@
|
||||
mod args;
|
||||
mod show_popup;
|
||||
|
||||
use args::{CliArgs, OsdArgs};
|
||||
use clap::Parser;
|
||||
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let cli = CliArgs::parse();
|
||||
let parsed_args: OsdArgs = cli.into();
|
||||
|
||||
show_popup::show_popup(&parsed_args)?;
|
||||
//show_popup::show_popup(/*&parsed_args*/)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@ -9,4 +9,7 @@ authors = ["Candifloss <candifloss.cc>"]
|
||||
categories = ["Desktop", "CLI"]
|
||||
homepage = "https://git.candifloss.cc/candifloss/popcorn.git"
|
||||
keywords = ["OSD", "popup", "desktop", "cli"]
|
||||
license = "GPL-3+"
|
||||
license = "GPL-3+"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.5.53", features = ["derive"] }
|
||||
@ -1,3 +1,12 @@
|
||||
mod args;
|
||||
|
||||
use args::{CliArgs, OsdArgs};
|
||||
use clap::Parser;
|
||||
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
let cli = CliArgs::parse();
|
||||
let parsed_args: OsdArgs = cli.into();
|
||||
|
||||
// Communicate with daemon
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user