Add export command
This commit is contained in:
parent
c573f1b0b0
commit
535d7ff236
4 changed files with 20 additions and 48 deletions
17
brood/src/commands/export.rs
Normal file
17
brood/src/commands/export.rs
Normal 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(())
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue