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:
@ -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 {
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user