Add export command

This commit is contained in:
Joscha 2024-12-31 15:38:03 +01:00
parent c573f1b0b0
commit 535d7ff236
4 changed files with 20 additions and 48 deletions

View file

@ -0,0 +1,17 @@
use std::{io, path::PathBuf};
use crate::data::Data;
#[derive(Debug, clap::Parser)]
pub struct Cmd {
out: PathBuf,
}
impl Cmd {
pub fn run(self, data: Data) -> io::Result<()> {
println!(">> Export");
data.write_to_file(&self.out)?;
Ok(())
}
}