Skip to content

SinghTaranjeet16/praw

Repository files navigation

Fetch new posts from Reddit

  • 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

Usage

  • 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
    • It should create a directory called logs with the log file in it

Requirements

  • 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 and praw_credentials and save information in those. Format will be key=value

Optional

  • Install Docker (ext-id: ms-azuretools.vscode-docker) extension in VSCode for easy docker operations

About

Usage for PRAW-Reddit api to get new posts

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published