Trying to create web-app to organize the saved reddit post.
- Search through your saved post
- Display based on category
- Drag and drop UI to change the post category and reflect on database
Praw is a library that interfaces with the Reddit API for you. It limits how many requests you can make, and makes it easy to extract the json responses.
You need to do a bit of setup first though in order for the bot to be able to post to Reddit.
Go to: https://www.reddit.com/prefs/apps And select Create App
Give it a name. You have to choose a redirect uri (for some stupid reason, stupid because I’m building a bot, not a webapp, but whatever). I chose http://127.0.0.1
You /will now get a client_id (red box below) and secret (blue box below). Note it down, but keep it secret./
Now, you need to update your praw ini file to remember these settings. Otherwise, you’ll have to put them in your script and thats dangerous (as others might see them).
This page describes how to change praw.ini files: https://praw.readthedocs.io/en/v4.0.0/getting_started/configuration/prawini.html
[mysavebot] client_id: <client_id> client_secret: <clien_secret> password: <password> username: <username>
- Your system must have docker and docker-compose installed
- Clone this repo
- Configure the praw.ini file and place it inside /app directory
- cd in the directory with
docker-compose.yml
- Run
$ docker-compose up --build -d
http://localhost/
to view the site- click Fetch button to fetch all your reddit saves and update the database
http://0.0.0.0:8081/db/redditsave/
mongo express url to view all your saved posts and comments in mongodb.
- To stop the docker images
- docker-compose down
- flask app
- mongodb for database
- react