aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/zot/main.rs
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2024-01-14 10:20:11 +0100
committerHarald Eilertsen <haraldei@anduin.net>2024-01-14 10:20:11 +0100
commit45962918683290be0a0ed9091d23f86f20a6d33e (patch)
treef7ab332265153a6f5154a7f5e3408381dd553a44 /src/bin/zot/main.rs
parent04b1504e8715ee6acf498a4261775f3b9d6d6daa (diff)
downloadrust-zotapi-45962918683290be0a0ed9091d23f86f20a6d33e.tar.gz
rust-zotapi-45962918683290be0a0ed9091d23f86f20a6d33e.tar.bz2
rust-zotapi-45962918683290be0a0ed9091d23f86f20a6d33e.zip
Additional stream tag types and flags + optional fields.
Diffstat (limited to 'src/bin/zot/main.rs')
-rw-r--r--src/bin/zot/main.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bin/zot/main.rs b/src/bin/zot/main.rs
index 209e097..83ae916 100644
--- a/src/bin/zot/main.rs
+++ b/src/bin/zot/main.rs
@@ -117,7 +117,12 @@ async fn main() -> Result<(), Box<(dyn std::error::Error + 'static)>> {
}
}
("stream", Some(_)) => {
- let s = Stream::from_json(&z.channel_stream().await?)?;
+ let json = z.channel_stream().await?;
+
+ std::fs::write("channel_stream.json", &json)
+ .expect("Unable to write channel_stream.json file");
+
+ let s = Stream::from_json(&json)?;
for item in s.items {
if item.is_post() {
if item.title.len() > 0 {