diff options
Diffstat (limited to 'fatcat-cli/src/commands.rs')
-rw-r--r-- | fatcat-cli/src/commands.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fatcat-cli/src/commands.rs b/fatcat-cli/src/commands.rs index 8ef6bb0..5b456d7 100644 --- a/fatcat-cli/src/commands.rs +++ b/fatcat-cli/src/commands.rs @@ -295,6 +295,9 @@ pub fn print_search_table(results: SearchResults, entity_type: SearchEntityType) SearchEntityType::Scholar => { writeln!(tw, "key\ttype\tstage\tyear\tcontainer_name\ttitle")?; } + SearchEntityType::Reference => { + writeln!(tw, "source\tkey\tprovenance\tstatus\ttarget")?; + } } for hit in results { let hit = hit?; @@ -348,6 +351,17 @@ pub fn print_search_table(results: SearchResults, entity_type: SearchEntityType) hit["biblio"]["title"].as_str().unwrap_or("-"), )?; } + SearchEntityType::Reference => { + writeln!( + tw, + "{}\t{}\t{}\t{}\t{}", + hit["source_release_ident"].as_str().unwrap_or("-"), + hit["ref_key"].as_str().unwrap_or("-"), + hit["match_provenance"].as_str().unwrap_or("-"), + hit["match_status"].as_str().unwrap_or("-"), + hit["target_release_ident"].as_str().unwrap_or("-"), + )?; + } } } tw.flush()?; |