2023-08-26 17:15:18 +01:00
|
|
|
# `nederlandskie`
|
|
|
|
|
2023-10-02 16:23:22 +01:00
|
|
|
A Bluesky feed generator written in Rust.
|
2023-08-26 17:15:18 +01:00
|
|
|
|
2023-10-02 16:23:22 +01:00
|
|
|
The specific algorithm indexes and serves posts written in Russian language, by people living in Netherlands.
|
|
|
|
|
2023-10-09 08:17:36 +01:00
|
|
|
Deployed in production at https://nederlandskie.plansfortheday.org/
|
2023-08-26 17:15:18 +01:00
|
|
|
|
2023-10-09 08:17:36 +01:00
|
|
|
Published on Bluesky at https://bsky.app/profile/did:plc:376mcc6k4s5p7qbtyjrgph5k/feed/nederlandskie.
|
2023-08-26 17:15:18 +01:00
|
|
|
|
2023-10-09 08:17:36 +01:00
|
|
|
## Setup
|
2023-08-26 17:15:18 +01:00
|
|
|
|
2023-10-09 08:17:36 +01:00
|
|
|
1. Set up a PostgreSQL database
|
2023-09-07 18:20:38 +01:00
|
|
|
|
2023-10-09 08:17:36 +01:00
|
|
|
2. Create tables using SQL provided in [sql/01_create_tables.sql].
|
|
|
|
|
|
|
|
3. Copy `.env.example` into `.env` and set up the environment variables within:
|
2023-09-07 18:20:38 +01:00
|
|
|
|
2023-09-22 12:33:13 +01:00
|
|
|
- `PUBLISHER_BLUESKY_HANDLE` to your Bluesky handle
|
|
|
|
- `PUBLISHER_BLUESKY_PASSWORD` to Bluesky app password that you created in settings
|
|
|
|
- `CHAT_GPT_API_KEY` for your ChatGPT key
|
|
|
|
- `DATABASE_URL` for PostgreSQL credentials
|
|
|
|
- `FEED_GENERATOR_HOSTNAME` to the hostname of where you intend to host the feed
|
|
|
|
|
2023-10-09 08:17:36 +01:00
|
|
|
4. Determine your own DID and put it in `PUBLISHER_DID` env variable in `.env`:
|
2023-09-22 12:33:13 +01:00
|
|
|
|
|
|
|
```
|
|
|
|
cargo run --bin who_am_i
|
|
|
|
```
|
2023-09-07 18:20:38 +01:00
|
|
|
|
2023-08-26 17:15:18 +01:00
|
|
|
## Running
|
|
|
|
|
2023-09-22 12:33:13 +01:00
|
|
|
### Populate and serve the feed
|
|
|
|
|
2023-08-26 17:15:18 +01:00
|
|
|
`cargo run`
|
2023-09-22 12:33:13 +01:00
|
|
|
|
2023-10-09 08:17:36 +01:00
|
|
|
The feed will be available at http://localhost:3030/.
|
|
|
|
|
2023-09-22 12:33:13 +01:00
|
|
|
### Determine your own did for publishing
|
|
|
|
|
|
|
|
`cargo run --bin who_am_i`
|
|
|
|
|
|
|
|
### Publish the feed
|
|
|
|
|
|
|
|
`cargo run --bin publish_feed -- --help`
|
2023-10-09 08:17:36 +01:00
|
|
|
|
|
|
|
### Force a profile to be in a certain country
|
|
|
|
|
|
|
|
`cargo run --bin force_profile_country -- --help`
|