Skip to content

Guide for setting things up

Ayam Dobhal edited this page Oct 16, 2019 · 4 revisions

Welcome to the subreddit-notifier wiki!

Here you can find the details regarding installation of subreddit-notifier

Prerequisites:

  1. An Android device.
  2. Termux. Get it from Google Play or F-Droid.
  3. Termux-API. Get it from Google Play or F-Droid.

Steps for installation:

  1. Launch Termux and let it configure.
  2. Install git.

pkg install git

  1. Install python.

pkg install python

  1. Clone the repository.

git clone https://github.com/AyamDobhal/subreddit-notifier

  1. Navigate to the repository directory.

cd <path-to-the-dir>

  1. Install the requirements.

pip install -r requirements.txt

  1. If everything has gone fine so far, go to this link and follow these steps to create your new app.
  • Login to reddit if you haven't already.
  • Select create app
  • Enter the name of your app. e.g. subreddit-notifier.
  • Select script.
  • Add description and url description.(optional)
  • For redirect uri, fill in this: https://localhost:8080
  • Press create new app.
  • Get your client_key and client_secret.

Steps to run:

  1. Export your client_key, client_secret and the name of the subreddit you want as environment variables.
  • export REDDIT_APP_KEY=<client_key>
  • export REDDIT_APP_SECRET=<client_secret>
  • export SUBREDDIT=<name of subreddit of your choice>
  1. Now that you're done with everything, run the following command to get the script running:

python main.py