ATProtoApps / community

A community repo to hold a discussion forum
https://atprotocol.dev
Other
2 stars 0 forks source link

Create a feed from an accounts followers #1

Closed bmann closed 3 weeks ago

bmann commented 3 weeks ago

I have an account, atprotocol.dev that is following people with custom domain names.

I would like to turn this into a feed, which I think can be done by turning it into a list

Would like a small script that when run, takes an account's followers, and creates / updates a list from it.

That list can then be used as input into Skyfeed or other feed creators.

Upvote & Fund

Fund with Polar

futurGH commented 3 weeks ago

This should work? Just need to fill in the variables above the ----- comment.

https://gist.github.com/futurGH/e57331e29cf9330d6c676ca75c597847

bmann commented 3 weeks ago

@futurGH awesome! I did the following:

Got this error:

Fetched list.
file:///Users/bmann/Developer/followinglist/followinglist.js:149
        items.push(...res.items);
                          ^

TypeError: res.items is not iterable (cannot read property undefined)
    at getAllListItems (file:///Users/bmann/Developer/followinglist/followinglist.js:149:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async file:///Users/bmann/Developer/followinglist/followinglist.js:31:19

Node.js v22.10.0

The list was created though! https://bsky.app/profile/atprotocol.dev/lists/3lac453barl27

Ran it again, and it worked!

OK, now we get to figure out how bounties work! Also I'll check in the script here into a scripts repo.

futurGH commented 3 weeks ago

Might've been a network error, updated the gist to handle that a bit better

bmann commented 3 weeks ago

@futurGH I checked it in here now into a scripts folder. I'm going to close this issues...which I think will then issue the Polar funding. Thanks for the script and thanks for experimenting!

bmann commented 3 weeks ago

Thank you @futurGH for contributing to close this issue! ⭐

The rewards from this issue, totaling $25, has been shared with you.

What now?

  1. Create a Polar account
  2. See incoming rewards & setup Stripe to receive them
  3. Get payouts as backers finalize their payments

If you already have a Polar account setup, you don't need to do anything.

bmann commented 3 weeks ago

OK, I made this a 90% (for @futurGH) and 10% (this repo / me holding it in trust) split. @futurGH if creating a Stripe account is a pain, I can also I think update it to be 100% for AT Proto Devs and I can transfer funds out of band. Hit me on the Discord for more chatting :)

futurGH commented 3 weeks ago

Gotcha, I'll see how difficult the process is