Whitespace
This commit is contained in:
16
src/main.rs
16
src/main.rs
@@ -110,7 +110,7 @@ struct ModeArgs {
|
|||||||
#[arg(group("mode"), help_heading("Mode Options"), short, long, conflicts_with_all(["save", "get", "list", "update", "delete", "status"]), requires("ids_or_tags"))]
|
#[arg(group("mode"), help_heading("Mode Options"), short, long, conflicts_with_all(["save", "get", "list", "update", "delete", "status"]), requires("ids_or_tags"))]
|
||||||
#[arg(help("Get an item either by it's ID or by a combination of matching tags and metatdata"))]
|
#[arg(help("Get an item either by it's ID or by a combination of matching tags and metatdata"))]
|
||||||
info: bool,
|
info: bool,
|
||||||
|
|
||||||
#[arg(group("mode"), help_heading("Mode Options"), short('S'), long, conflicts_with_all(["save", "get", "list", "update", "delete", "info"]))]
|
#[arg(group("mode"), help_heading("Mode Options"), short('S'), long, conflicts_with_all(["save", "get", "list", "update", "delete", "info"]))]
|
||||||
#[arg(help("Show status of directories and supported compression algorithms"))]
|
#[arg(help("Show status of directories and supported compression algorithms"))]
|
||||||
status: bool
|
status: bool
|
||||||
@@ -650,7 +650,7 @@ fn mode_info(cmd: &mut Command, args: Args, ids: &mut Vec<i64>, tags: &mut Vec<S
|
|||||||
false => db::get_item_matching(conn, tags, &meta)?
|
false => db::get_item_matching(conn, tags, &meta)?
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
if let Some(item) = item_maybe {
|
if let Some(item) = item_maybe {
|
||||||
debug!("MAIN: Found item {:?}", item);
|
debug!("MAIN: Found item {:?}", item);
|
||||||
let item_id = item.id.unwrap();
|
let item_id = item.id.unwrap();
|
||||||
@@ -674,16 +674,16 @@ fn mode_info(cmd: &mut Command, args: Args, ids: &mut Vec<i64>, tags: &mut Vec<S
|
|||||||
]));
|
]));
|
||||||
|
|
||||||
let ts_cell = Cell::new(&item.ts.with_timezone(&Local).format("%F %T").to_string());
|
let ts_cell = Cell::new(&item.ts.with_timezone(&Local).format("%F %T").to_string());
|
||||||
|
|
||||||
table.add_row(Row::new(vec![
|
table.add_row(Row::new(vec![
|
||||||
Cell::new("Timestamp").with_style(Attr::Bold),
|
Cell::new("Timestamp").with_style(Attr::Bold),
|
||||||
ts_cell
|
ts_cell
|
||||||
]));
|
]));
|
||||||
|
|
||||||
|
|
||||||
let mut item_path = data_path.clone();
|
let mut item_path = data_path.clone();
|
||||||
item_path.push(item.id.unwrap().to_string());
|
item_path.push(item.id.unwrap().to_string());
|
||||||
|
|
||||||
table.add_row(Row::new(vec![
|
table.add_row(Row::new(vec![
|
||||||
Cell::new("Path").with_style(Attr::Bold),
|
Cell::new("Path").with_style(Attr::Bold),
|
||||||
Cell::new(item_path.to_str().expect("Unable to get item path"))
|
Cell::new(item_path.to_str().expect("Unable to get item path"))
|
||||||
@@ -698,8 +698,8 @@ fn mode_info(cmd: &mut Command, args: Args, ids: &mut Vec<i64>, tags: &mut Vec<S
|
|||||||
Cell::new("Stream Size").with_style(Attr::Bold),
|
Cell::new("Stream Size").with_style(Attr::Bold),
|
||||||
size_cell
|
size_cell
|
||||||
]));
|
]));
|
||||||
|
|
||||||
|
|
||||||
let compression_type = CompressionType::from_str(&item.compression)?;
|
let compression_type = CompressionType::from_str(&item.compression)?;
|
||||||
table.add_row(Row::new(vec![
|
table.add_row(Row::new(vec![
|
||||||
Cell::new("Compression").with_style(Attr::Bold),
|
Cell::new("Compression").with_style(Attr::Bold),
|
||||||
@@ -728,7 +728,7 @@ fn mode_info(cmd: &mut Command, args: Args, ids: &mut Vec<i64>, tags: &mut Vec<S
|
|||||||
Cell::new(&meta.value)
|
Cell::new(&meta.value)
|
||||||
]));
|
]));
|
||||||
}
|
}
|
||||||
|
|
||||||
table.printstd();
|
table.printstd();
|
||||||
Ok(())
|
Ok(())
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user