https://github.com/nymann/reddit_multi
Adds the feature to post to multiple subreddits at once from the command line.
https://github.com/nymann/reddit_multi
Last synced: 8 months ago
JSON representation
Adds the feature to post to multiple subreddits at once from the command line.
- Host: GitHub
- URL: https://github.com/nymann/reddit_multi
- Owner: nymann
- Created: 2022-03-24T21:43:25.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-24T21:59:51.000Z (about 4 years ago)
- Last Synced: 2025-03-28T21:06:50.062Z (about 1 year ago)
- Language: Python
- Size: 1.95 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Reddit Multi
Create a new text or image submission to Reddit from your command line to one or more subreddits at once.
### Installation
```sh
python -m pip install git+https://github.com/nymann/reddit_multi.git
```
### Examples
```sh
reddit_multi --title "Testing image upload" --client-id REDDIT_CLIENT_ID --client-secret REDDIT_CLIENT_SECRET --refresh-token REFRESH_TOKEN --image-path /tmp/test.jpg testingground4bots bottesting
```
The above command will upload the image located at the path `/tmp/test.jpg` to the two subreddits `r/testingground4bots` and `r/bottesting`. A guide to setting up the `client-id`, `client-secret` and `refresh-token` can be found [here](https://www.jcchouinard.com/get-reddit-api-credentials-with-praw/).
Alternative the `client-id`, `client-secret` and `refresh-token` can be read from the environment variables, like so:
```sh
export REDDIT_CLIENT_SECRET=blabla
export REDDIT_CLIENT_ID=blabla
export REFRESH_TOKEN=blabla
reddit_multi --title "Testing image upload" --image-path /tmp/test.jpg testingground4bots bottesting
```