- Usage for PRAW-Reddit api to get new posts from a subreddit
- New posts are saved in a dictionary along with the timestamp which gets updated whenever new entry is added
- Send a push notification to android through pushbullet for new posts
- Also provided Dockerfile in case you want to run it as a docker container
- Clone the repo
- Create API token for PRAW from Reddit
- Create API token for Pushbullet notifier from Pushbullet
- Fill in the correct credentials for both pushbullet and praw
- Either you can run the code as
python3 main.py
or through Dockerfile as follows- Build image from Dockerfile
docker build --tag <name>:<tag> .
- Run the image in detatched mode
docker run -d -v $(pwd)/logs:/praw/logs --name <container_name> <name>:<tag>
- Or run it in interactive mode by using
-it
instead of-d
- Or run it in interactive mode by using
- It should create a directory called logs with the log file in it
- Build image from Dockerfile
- Python 3+ (tested on version 3.7.7)
- Install PRAW to interact with Reddit
- Install Notifiers to send notifications to android
- Create 2 files without extension in parent directory named
pushbullet_credentials
andpraw_credentials
and save information in those. Format will bekey=value
- Install Docker (ext-id: ms-azuretools.vscode-docker) extension in VSCode for easy docker operations