This server-less bot runs data analytics on /r/neoliberal, on the Discussion Thread from the previous day.
- Install python
- Download this project
- Create a new Reddit account for this bot. Go to https://www.reddit.com/prefs/apps/ to create the bot.
- Take note of the bot's Client ID and Client Secret. They look like this: https://i1.wp.com/pythonforengineers.com/wp-content/uploads/2014/11/redditbot2.jpg
- Edit the values in .sample-env in this project with the Client ID, Client Secret, and the username and password for your bot's account.
- Using the command prompt / terminal, navigate to this project's folder and run:
python setup.py
This should create the .env file you need to run this bot, based on .sample-env. 7. Using the command prompt / terminal, install all required dependencies
Using the command prompt / terminal, navigate to this project's folder and run:
python app.py
Even if you run it multiple times, the bot will not post more than one time for each Discussion Thread.
This way, the bot will visit reddit daily and notify you on new manga, and you don't have to manually run it each time. The bot tries to read every post that has been uploaded since the last post it read. This means that, the less frequently you run the bot, the more posts it has to read. If you run the bot very infrequently (e.g. once every two months or something), it may time out before it reads every post.
- Using any text editor, create a .bat file (the filename doesn't matter) with the following line:
python C:/{PATH_TO_YOUR_DIRECTORY}/app.py
Replacing {PATH_TO_YOUR_DIRECTORY} with the path to this project on your computer 2. Follow these steps to add this .bat file to your startup folder: https://www.computerhope.com/issues/ch000322.htm
- Create environment variables for the .env values (CLIENT_ID, CLIENT_SECRET, etc.): https://msdn.microsoft.com/en-us/library/windows/desktop/ms682653%28v=vs.85%29.aspx
Same basic idea, but with a bash script (.sh, not .bat).