mirror of
https://github.com/pcvolkmer/osc-variant.git
synced 2025-07-03 01:02:55 +00:00
chore: remove interactive mode
This commit is contained in:
@ -85,12 +85,6 @@ pub enum SubCommand {
|
||||
help = "Entferne Einträge aus der Systembibliothek die nicht importiert werden (Optional)."
|
||||
)]
|
||||
strip: bool,
|
||||
#[arg(
|
||||
short = 'i',
|
||||
long = "interactive",
|
||||
help = "Starte interaktiven Dialog zum Modifizieren von OSC-Dateien"
|
||||
)]
|
||||
interactive: bool,
|
||||
#[arg(
|
||||
long = "fix",
|
||||
help = "Erweiterte Problembehandlung und Reparatur der OSC-Datei"
|
||||
|
@ -25,7 +25,6 @@ use crate::profile::Profile;
|
||||
use clap::CommandFactory;
|
||||
use clap_complete::{generate, Shell};
|
||||
use console::style;
|
||||
use dialoguer::Confirm;
|
||||
use quick_xml::se::Serializer;
|
||||
use serde::Serialize;
|
||||
use sha2::{Digest, Sha256};
|
||||
@ -56,18 +55,8 @@ pub fn handle(command: SubCommand) -> Result<(), Box<dyn Error>> {
|
||||
compact,
|
||||
sorted,
|
||||
strip,
|
||||
interactive,
|
||||
fix,
|
||||
} => handle_modify(
|
||||
inputfile,
|
||||
profile,
|
||||
outputfile,
|
||||
compact,
|
||||
sorted,
|
||||
strip,
|
||||
interactive,
|
||||
fix,
|
||||
)?,
|
||||
} => handle_modify(inputfile, profile, outputfile, compact, sorted, strip, fix)?,
|
||||
SubCommand::Diff {
|
||||
inputfile_a,
|
||||
inputfile_b,
|
||||
@ -221,7 +210,6 @@ fn handle_modify(
|
||||
compact: bool,
|
||||
sorted: bool,
|
||||
strip: bool,
|
||||
interactive: bool,
|
||||
fix: bool,
|
||||
) -> Result<(), Box<dyn Error>> {
|
||||
let mut data: OnkostarEditor = InputFile::read(inputfile, None)?.try_into()?;
|
||||
@ -236,38 +224,6 @@ fn handle_modify(
|
||||
data.apply_profile(&profile);
|
||||
}
|
||||
|
||||
let mut compact = compact;
|
||||
let mut sorted = sorted;
|
||||
let mut strip = strip;
|
||||
|
||||
if interactive {
|
||||
compact = matches!(
|
||||
Confirm::new()
|
||||
.with_prompt("Kompakte Ausgabe, ohne Einrücken?")
|
||||
.default(compact)
|
||||
.interact(),
|
||||
Ok(true)
|
||||
);
|
||||
|
||||
sorted = matches!(
|
||||
Confirm::new()
|
||||
.with_prompt("Sortiere Kataloge und Formulare nach Name und Abhängigkeiten?")
|
||||
.default(sorted)
|
||||
.interact(),
|
||||
Ok(true)
|
||||
);
|
||||
|
||||
strip = matches!(
|
||||
Confirm::new()
|
||||
.with_prompt(
|
||||
"Entferne Einträge aus der Systembibliothek die nicht importiert werden?",
|
||||
)
|
||||
.default(strip)
|
||||
.interact(),
|
||||
Ok(true)
|
||||
);
|
||||
}
|
||||
|
||||
if fix {
|
||||
// No operation as of now
|
||||
}
|
||||
|
Reference in New Issue
Block a user