25 lines
619 B
Markdown
25 lines
619 B
Markdown
# Reddit TestPostsBot
|
|
|
|
## Usage
|
|
|
|
1. Fill in your Reddit API credentials and subreddit name in `bot.py`.
|
|
2. Create a wiki page in your subreddit named `testpostsbot_config` with JSON like:
|
|
|
|
```
|
|
{
|
|
"posts": [
|
|
{"title": "Test Post 1", "body": "Body for post 1"},
|
|
{"title": "Test Post 2", "body": "Body for post 2"}
|
|
]
|
|
}
|
|
```
|
|
|
|
3. Build and run with Docker:
|
|
|
|
```
|
|
docker build -t testpostsbot .
|
|
docker run --env REDDIT_CLIENT_ID=... --env REDDIT_CLIENT_SECRET=... --env REDDIT_USERNAME=... --env REDDIT_PASSWORD=... --env SUBREDDIT=... testpostsbot
|
|
```
|
|
|
|
Or edit the variables directly in `bot.py` for quick testing.
|