reorganization

This commit is contained in:
Junko 2023-11-27 08:42:45 +01:00
parent d1b43786bc
commit cd008a024a
1 changed files with 23 additions and 23 deletions

View File

@ -11,25 +11,6 @@ use serde_json::Value;
use dirs;
const PK_URL: &str = "https://api.pluralkit.me/v2";
const SP_URL: &str = "https://api.apparyllis.com/v1";
const EXAMPLE_JSON: &str = r#"{
"pk_key": "// Pluralkit token",
"sp_key": "// Simplplural token",
"pfp_module": {
"enabled": false,
"pfp_folder": "// Folder to grab profile pictures, they follow they member1member2.png format",
"pfp_output_path": "// Path for the copied selected pfp"
},
"disc_module": {
"enabled": false,
"token": "// Discord user token",
"python_path": "// Path of the python executable",
"script_path": "// Path of the pfp changer python script"
}
}"#;
#[derive(Debug, Serialize, Deserialize)]
struct Config {
pk_key: String,
@ -80,8 +61,26 @@ impl Fronters {
}
}
fn main() {
let helpstring = r#"PluralSync
const PK_URL: &str = "https://api.pluralkit.me/v2";
const SP_URL: &str = "https://api.apparyllis.com/v1";
const EXAMPLE_JSON: &str = r#"{
"pk_key": "// Pluralkit token",
"sp_key": "// Simplplural token",
"pfp_module": {
"enabled": false,
"pfp_folder": "// Folder to grab profile pictures, they follow they member1member2.png format",
"pfp_output_path": "// Path for the copied selected pfp"
},
"disc_module": {
"enabled": false,
"token": "// Discord user token",
"python_path": "// Path of the python executable",
"script_path": "// Path of the pfp changer python script"
}
}"#;
const HELP_STRING: &str = r#"PluralSync
Made by Jvnko@lavenderfield
Usage:\npluralsync [COMMAND] [member1] [member2]...
@ -93,6 +92,7 @@ get - Refreshes the current front information
add - Adds a member to the existing front
memberlist - Shows loaded member list"#;
fn main() {
if std::env::args().len() > 1 {
let augs: Vec<String> = std::env::args().collect();
let command = &augs[1];
@ -125,13 +125,13 @@ memberlist - Shows loaded member list"#;
let _ = get(config_path);
},
"memberlist" => memberlist(config_path),
&_ => println!("{}", helpstring),
&_ => println!("{}", HELP_STRING),
}
},
None => println!("Something went wrong")
}
} else {
println!("{}", helpstring);
println!("{}", HELP_STRING);
}
}