1
0
mirror of https://github.com/pcvolkmer/osc-variant.git synced 2025-07-03 01:02:55 +00:00

Experimental sort of exported content

This commit is contained in:
2023-07-03 08:26:04 +02:00
parent ad35b99371
commit 376bfb2852
3 changed files with 17 additions and 0 deletions

View File

@ -52,6 +52,11 @@ pub enum Command {
outputfile: Option<String>,
#[arg(long = "compact", help = "Kompakte Ausgabe, ohne Einrücken (Optional)")]
compact: bool,
#[arg(
long = "x-sorted",
help = "EXPERIMENTELL: Sortiere Kataloge und Formulare nach Name (Optional). Kann negative Auswirkungen auf den ordnungsgemäßen Import haben."
)]
sorted: bool,
},
#[command(about = "Vergleiche zwei Dateien anhand der Revision der enthaltenen Inhalte")]
Diff {

View File

@ -122,6 +122,7 @@ fn main() -> Result<(), Box<dyn Error>> {
profile,
outputfile,
compact,
sorted,
} => {
let data = &mut read_inputfile(inputfile)?;
@ -132,6 +133,10 @@ fn main() -> Result<(), Box<dyn Error>> {
data.apply_profile(&profile);
}
if sorted {
data.sorted();
}
let mut buf = String::new();
let mut serializer = Serializer::new(&mut buf);