Commit Graph

25 Commits

Author SHA1 Message Date
Aleksei Voronov 7ec26c1bef Upgrade tokio stuff
Something is screwy with stack overflowing when there's many profiles to check

This is my first attempt at fixing the problem
2024-11-17 19:28:27 +01:00
Aleksei Voronov b8d1fd7695 Upgrade everything to latest versions
This includes a bunch of small changes to adapt to how atrium-api has changed
over time. They're not functional or interesting, just some type-level
adjustments that are needed.

Some more complicated logic was changed in how profile details are parsed,
since atrium's way of doing things is weird and hard to understand so I just
manually grab stuff from the object map instead of relying on atrium's types.
This is similar to how CBOR parsing is done.

Boring maintenance stuff.
2024-08-18 14:27:23 +02:00
Aleksei Voronov 10d4556ff3 Timeout if we haven't received any messages in 60 seconds
Sometimes, it seems, Bluesky just stops sending us messages. I do not know why.
Let's just try to timeout if that ever happens again?
2024-01-15 15:01:22 +01:00
Aleksei Voronov 1555a803e9 Upgrade dependencies
No breakage this time, nice
2024-01-15 14:15:07 +01:00
Aleksei Voronov 2bb88d69b3 Upgrade dependencies
- For new axum, use the new way to start the server. No other changes seem necessary.
- For new atrium, update the way agent is initialized. Also now we cannot get the
  session out of the agent, so resolve our own handle to the did with an extra request.
  This is a shame, but eh. That's what you get when using unstable libraries
2023-11-29 10:39:29 +01:00
Aleksei Voronov 35ee1b0a1f Simplify Bluesky api usage
`atrium-api` now includes an `AtpAgent` which takes care of creating
and refreshing sessions automatically, so we no longer need our
custom xrpc client and session management logic.

This is nice.
2023-11-06 08:53:23 +01:00
Aleksei Voronov 524598a40b Upgrade to latest atrium-api
Some breakage there, but nothing major.

They also have AtpAgent now so maybe we can get rid of our custom session-refreshing thing?
2023-11-05 20:51:16 +01:00
Aleksei Voronov c7bceefc07 Upgrade dependencies 2023-10-30 19:06:59 +01:00
Aleksei Voronov f008057f8a Upgrade dependencies because why not 2023-10-15 11:47:56 +02:00
Aleksei Voronov 1bd843a05a Fix publishing feeds
This basically required implementing authentication from ground up
because atrium-api is horribly deficient when it comes to it,
providing basically no real way to manage it, and what is provided
is actually broken anyway requiring additional hacks to get around

Ah well. This has been the story of using anything in Rust that's
related to Bluesky. Everything is broken.
2023-10-07 18:26:20 +02:00
Aleksei Voronov 70f9733112 Upgrade dependencies because why not 2023-10-02 17:26:21 +02:00
Aleksei Voronov 642a3d57cc Remove ciborium in favor of custom deserialization logic
Unfortunately, looks like serde is not flexible enough to support everything CBOR does,
so a lot of messages cannot be deserialized properly. Other serde-based CBOR libraries
suffer from the same problem.

So now we have a bunch of boring deserialization logic supported by sk-cbor
2023-09-24 20:06:20 +02:00
Aleksei Voronov 3a54e04bf4 Upgrade atrium-api dependency 2023-09-22 18:21:08 +02:00
Aleksei Voronov e95c4923d6 Add some untested version of publishing a feed
Also adjust names of different env vars, and also adjust setup instructions
2023-09-22 13:33:13 +02:00
Aleksei Voronov 62b00ceed7 Replace random print statements with proper logging setup 2023-09-21 11:22:18 +02:00
Aleksei Voronov f4ee482ce7 Use Arcs to pass stuff around to avoid dealing with lifetimes
And also implement proper language detection through lingua-rs,
because Bluesky's detection is really bad
2023-09-21 10:36:47 +02:00
Aleksei Voronov 14b9f846da Refactor things
Make the overall design a little more flexible if one wants
to easily implement multiple feeds, and also kinda closer to
the original template provided by Bluesky devs
2023-09-16 21:07:00 +02:00
Aleksei Voronov a11c5446d5 Upgrade dependencies 2023-09-16 17:39:09 +02:00
Aleksei Voronov b4250e12cd Serve the feed, according to all the Atproto endpoints 2023-09-16 17:13:57 +02:00
Aleksei Voronov c2899951f6 Read chatgpt and postgresql credentials from .env 2023-09-07 19:20:38 +02:00
Aleksei Voronov 3180db4779 Upgrade dependencies, part 2 2023-09-07 19:02:12 +02:00
Aleksei Voronov 46974a9d8c Detect profiles' likely country of residence through chatgpt
In a separate thread
2023-09-06 08:26:03 +02:00
Aleksei Voronov 6365007fd8 Upgrade dependencies 2023-08-31 15:09:42 +02:00
Aleksei Voronov e5b3db1470 Refactor streaming and start inserting Russian posts into db 2023-08-31 09:42:56 +02:00
Aleksei Voronov 13cef8786c Initial version of things: just reads the stream of messages and prints it out and that's that 2023-08-18 21:11:49 +02:00