diggan 3 days ago

> That said, just the other day I was thinking, is the reverse possible. I have a web site/blog. Use RSS and then the RSS updates are posted to a handle on Bluesky. I would assume that's a lot more useful?

This is trivial, I'm currently doing this for https://bsky.app/profile/aemet-bot.bsky.social which reads a bunch of RSS feeds from AEMET (Spain's national weather service basically) and posts warnings to the feed if there is any warning above Yellow.

The code for managing this is about ~200 lines of Rust code.

2
skiman10 3 days ago

Do you have that code posted somewhere by chance? I would be interested in browsing through it!

diggan 3 days ago

Not right now, no. It's fairly simple (login to Bluesky, read RSS, save item IDs to a text file, post if there are any new feed items, close program then systemd timers run this every N minutes) + pretty specific to AEMET and their formats.

If there is interest I guess I could spend some hours to make it a bit more generic and publish the source.

skiman10 3 days ago

Cool yeah. I think the thing I was most interested in was interacting with Bluesky through rust. Is there a decent sdk for that?

diggan 3 days ago

The meat is this, using bsky-sdk + atrium-api from crates:

    let agent = BskyAgent::builder().build().await?;
    agent
        .login("username.bsky.social", "X")
        .await?;
    let rt = RichText::new_with_detect_facets(msg).await?;
    let record = RecordData {
        text: rt.text,
        created_at: atrium_api::types::string::Datetime::now(),
        facets: rt.facets,
    };
    agent.create_record(record).await?;
Works well enough. It's a bit on the lower end of the "abstraction ladder", there might be more user-friendly libraries for doing this even easier now.

nutanc 3 days ago

This is cool. Actually if bluesky can do this automatically where it can fetch RSS and show as handle updates it will be really useful. Will help a bunch of people who wouldn't need to maintain the services.

Or maybe there is a potential for a SaaS service?