Skip to content

theimperious1/RepostMaster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This ReadMe file is a modified copy of the official TheReposterminator.

It's because it's based off it and all of the repost detection and a lot of functionality is from it. I've chosen to leave it here to help anyone who wishes to use their own instance of this bot. The official RepostMaster bot is /u/RepostMasterBot and the official TheReposterminator bot is /u/TheReposterminator. Credits to the developers of it for the base functionality. If you want to view TheReposterminator's source it's located at https://github.com/nickofolas/TheReposterminator/.

RepostMaster

RepostMaster is a fork of RepostMaster reddit bot made to detect reposts.

  • Indexed submission media as soon as it joins a subreddit
  • Retains indexed media even after being removed from a subreddit, so if readded, it can start working again without a problem
  • Temporarily removes possible reposts, and leaves a comment with more detail, listing all detected duplicates for the user to review and approve or remove, all by themselves!

How does it work?

Once you add it to a subreddit, RepostMaster will index posts from the top of the subreddit initially, and then it will start scanning /new/ regularly. If it finds a submission that matches other stored submissions for the subreddit, it will temporarily remove it and leave a comment for the user to review and approve or remove by replying to the comment with !approve or !remove.

An example of TheReposterminator reporting a post and leaving a comment with details

RepostMaster keeps track of submission media by storing a hash generated by the pixels in the image. Whenever it scans media, it uses an algorithm to compare the hashes of the images, and if the similarity is above a certain threshold, it will report it. This algorithm is from TheReposterminator.

Sounds great, how do I use it?

Using RepostMaster is simple; simply invite /u/RepostMasterBot to moderate a subreddit of your choice, and within a few minutes, the subreddit will be indexed, and it'll be scanned for reposts constantly.

While the original Reposterminator can work with any permissions, RepostMaster requires wiki, posts and flair permissions. Once RepostMaster has indexed your subreddit, it will get to work. This fork of TheReposterminator was made to reduce mod-queue load, and let your community self-moderate it's own reposts. This may not be for every community, but may be worth a try if you think your community can do it.

If you don't want RepostMaster helping out anymore, it's as simple as removing it as a moderator of the subreddit. RepostMaster will retain media processed on your subreddit in the event that you want to add it back, so it can seamlessly integrate back into the subreddit.

What if I want to run my own instance?

  1. Install Python3.8 or above, as it is required to run the bot at all.

  2. Install the bot's dependencies, that is, pip install -U -r requirements.txt

  3. Have a database set up, and with the psql tool, run:

\i db_code.sql

This will create all necessary tables required to store the bot's data.

  1. Create the config.py file in the same directory as __main__.py and bot.py. The format for this is as follows:
__all__ = ['db_name', 'db_user', 'db_host', 'db_pass', 'reddit_id', 'reddit_secret', 'reddit_pass', 'reddit_agent', 'reddit_name']

db_name = '' # The name of the database used
db_user = '' # The name of the database user
db_host = '' # The database host
db_pass = '' # The password of the database

reddit_id = '' # The Reddit application's client ID
reddit_secret = '' # The Reddit application's client secret
reddit_pass = '' # The password of the Reddit account the bot uses
reddit_agent = '' # The user agent the bot will use
reddit_name = '' # The username of the Reddit account the bot uses
  1. Run the bot

To run the bot, simply navigate to the directory that db_code.sql and requirements.txt installed themselves to, and run RepostMaster as a Python module.

python3 -m RepostMaster [arguments]

Available arguments for running RepostMaster can be found by running python3 -m RepostMaster -h

This is a fork/specialized version of TheReposterminator: https://github.com/nickofolas/TheReposterminator

About

An anti-repost bot made for Reddit. This was made before Devvit existed. By u/theimperious1.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages