cli now shows meme id in list and search commands

This commit is contained in:
LordMZTE 2022-01-20 22:43:34 +01:00
parent 676f5713ed
commit 0855af438e
2 changed files with 6 additions and 5 deletions

View file

@ -19,7 +19,7 @@ path = "src/main.rs"
anyhow = "1.0.52"
chrono = "0.4.19"
clap = "2.34.0"
clap = "3.0.10"
comfy-table = "5.0.0"
env_logger = "0.9.0"
fuzzy-matcher = "0.3.7"
@ -27,9 +27,9 @@ indicatif = "0.16.2"
libjens = { git = "https://tilera.xyz/git/LordMZTE/libjens.git", rev = "1.1.0" }
log = "0.4.14"
opener = "0.5.0"
reqwest = { version = "0.11.8", features = ["stream", "multipart"] }
serde_json = "1.0.73"
structopt = "0.3.25"
reqwest = { version = "0.11.9", features = ["stream", "multipart"] }
serde_json = "1.0.75"
structopt = "0.3.26"
term_size = "0.3.2"
tokio = { version = "1.15.0", features = ["macros", "fs", "process", "rt-multi-thread"] }
tokio-util = { version = "0.6.9", features = ["codec"] }

View file

@ -28,7 +28,7 @@ macro_rules! impl_table_header {
impl_table_header!(User, vec!["Name", "ID"]);
impl_table_header!(Category, vec!["Name", "ID"]);
impl_table_header!(Meme, vec!["Link", "Category", "User", "Timestamp"]);
impl_table_header!(Meme, vec!["Link", "Category", "User", "Timestamp", "ID"]);
/// a newtype wrapper to convert libjens types to table rows
pub struct JMTableEntry<T>(pub T);
@ -55,6 +55,7 @@ impl From<JMTableEntry<Meme>> for Row {
.timestamp(e.0.timestamp, 0)
.format("%F %R")
.to_string(),
e.0.id,
]
.into()
}