aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2023-03-26 15:29:12 +0200
committerHarald Eilertsen <haraldei@anduin.net>2023-03-26 15:29:12 +0200
commit3ca27bd893fc5d492568457d140308501d5244c3 (patch)
treeeeff17d95dd30e3081e25224a2598e1b7eb97a12 /src
parentcabdcc0a881354de7901e7c589b29a43048d4c42 (diff)
downloadrust-zotapi-3ca27bd893fc5d492568457d140308501d5244c3.tar.gz
rust-zotapi-3ca27bd893fc5d492568457d140308501d5244c3.tar.bz2
rust-zotapi-3ca27bd893fc5d492568457d140308501d5244c3.zip
Make abook output prettier.
Only print the most relevant information from the returned data. Output it as CSV (but we don't do any sort of escaping yet). This will probably not stay this way, but works as a demonstration for now.
Diffstat (limited to 'src')
-rw-r--r--src/bin/zot/main.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bin/zot/main.rs b/src/bin/zot/main.rs
index f2caac4..a8451b2 100644
--- a/src/bin/zot/main.rs
+++ b/src/bin/zot/main.rs
@@ -95,7 +95,9 @@ async fn main() {
if m.is_present("raw") {
println!("{}", r.fetch_raw(&client).await.unwrap());
} else {
- println!("{:?}", r.fetch(&client).await);
+ for abook in r.fetch(&client).await.unwrap() {
+ println!("{},{},{}", abook.xchan.name, abook.xchan.address, abook.xchan.network);
+ }
}
}
("group", Some(m)) => {