Aerostream is Bluesky client using EventStream.
It can be used as a library or as a command line tool.
shell
cargo install aerostream
aerostream
yaml
filters:
- name: <Column Name>
subscribes:
dids:
- <DID to identify the repository to subscribe to>
handles:
- <Handle to identify the repository to subscribe to>
keywords:
includes:
- <Keywords to include in Column even if you are not subscribed>
excludes:
- <Keywords to exclude in Column even if you are subscribed>
langs:
includes:
- <Languages to include in Column even if you are not subscribed>
excludes:
- <Languages to exclude in Column even if you are subscribed>
```rust use std::{ io::{stdout, Write}, time::Duration, };
use aerostream::Client; use anyhow::Result; use chrono::Local;
fn main() -> Result<()> {
envlogger::init();
let mut client = Client::default();
client.settimeout(5);
client.connectws()?;
for (filter, event) in client.nexteventfilteredall()?.iter() {
let Some(commit) = event.ascommit() else {
continue;
};
let posts = commit.getposttext();
if posts.isempty() {
continue;
}
let text = posts.join(" ").replace("\n", " ");
let time = commit.time.withtimezone(&Local).format("%m/%d %H:%M");
let handle = match client.getrepo(&commit.repo) {
Ok(r) => r.handle.clone(),
_ => String::from("UNKNOWN"),
};
let blobs = commit
.blobs
.iter()
.map(|b| b.tostring())
.collect::