this repo has no description
at main 27 lines 1.1 kB view raw view rendered
1# How to publish a feed 2 3Supercell is a feed generator, that is to say it is the service that fulfills feed requests and returns the posts that are displayed. 4 5To invoke Supercell, you first need to create a record on your PDS saying that you are publishing a feed for others to use. This is called feed publishing. 6 7This is done by creating a record on your PDS with the following structure: 8 9```json 10{ 11 "$type": "app.bsky.feed.generator", 12 "did": "did:web:the_hostname", 13 "displayName": "Feed A", 14 "description": "A useful feed.", 15 "createdAt": "2024-10-30T16:15:31Z" 16} 17``` 18 19The `did` is a did:web identifier where the hostname is used to service a DID document that contains a "BskyFeedGenerator" service structure with the hostname to make API calls. 20 21## Publish script 22 23The `publish.py` script can be used to create new feed records or update existing ones. 24 251. Create a new virtual environment to run the script in: `python -m venv ./venv/` 262. Install the atproto library in the virtual environment: `./venv/bin/pip install atproto` 273. Invoke the script using the virtual environment: `./venv/bin/python ./etc/publish.py --help`