Skip to content

A Bot for Reddit that gets top Hot sorted picture from a given Subreddit and sets it as background.

License

Notifications You must be signed in to change notification settings

Kandeel4411/RedditWallpaperBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RedditWallpaperBot

A Bot for Reddit that gets top Hot sorted picture from a given Subreddit and sets it as background.

Supported OS & Environments

Windows, Mac and Linux(Ubuntu, Linux Mint)

Prerequisite

  • Must have python3.6+ installed.

Installation:

  • Download the repository by clicking the green "Clone or download" button on the top-right of the repository's main page, then click on "Download ZIP"

  • Extract folder to desired location

  • With the Reddit account that the bot will use go to Preferences -> Apps and create an app. Pick any name, choose script, and set the redirect url to http://localhost. Description and about url can be blank.

i.e: eeeeee

  • In etc/config.ini add your client id and client secret from the app you just created. Client id is the id underneath the name of the app. Client secret is labeled.

  • Choose one of the following methods:

(Installing in closed environment) Recommended:

  • Install pipenv through pip.
    pip install pipenv

  • Open the extracted folder in terminal and run pipenv install.
    cd RedditWallpaperBot-master && pipenv install

Or:

(Installing globally):

  • Open the extracted folder in terminal and run:
    pip install -r requirements.txt

Usage:

Usage Demo

Skip this step if you installed globally

  • Open extracted folder and run:
    pipenv shell

  • Run main.py.
    python main.py

Or:

  • Open extracted folder and run main.py script directly by double clicking.

Usage as Library:

  • Notes: If you want to import the bot functions, it by default uses sys.exit() to exit program once an error has been caught. You may want to use bot.raise_bot_exception(option=True) to raise BotExceptions instead that you can catch.

Acknowledgement:

https://github.com/Dextroz/Wallie for Mac support.