Reddit bot that uses streaming services to enforce popularity limits on new subreddit submissions, see in action.
This project started to decrease the amount of popular music shared on /r/listentothis and hereby encourage the sharing of undiscovered and underappreciated artists. This came to light after a post pointing out that recent top submissions are breaking the subreddit's rules.
cp conf/config.ini.dist conf/config.ini
config/config.ini
fileREMOVE_SUBMISSIONS
to true if you want to remove exceeding submission, otherwise it will create a rapportSEND_ARTIST_REPLY
if you want the bot to reply with a last.fm artist biodocker build -t blottertrax .
docker volume create blottertrax
docker run --mount source=blottertrax,target=/usr/src/app/database blottertrax
And that's it! If it doesn't work you can create an issue
Please set the SUBREDDIT
in conf/config.ini
to select the desired subreddit to moderate. This only works when the Reddit account is moderator of the selected subreddit
As this bot is running 2 applications, handling new submissions and modmail it's run with multiprocessing.
To debug, in main.py
change the code for the application you want to debug. For example only testing mod mail:
lock = Lock()
# Process(target=ModMailDaemon().start, args=(lock,)).start()
# Process(target=SubmissionDaemon().start, args=(lock,)).start()
ModMailDaemon().start(lock)
If you have features or bugfixes don't be shy to create a pull requests or bug report!
Thanks to:
You may copy, distribute and modify the software as long as you track changes/dates in source files. Any modifications to or software including (via compiler) GPL-licensed code must also be made available under the GPL along with build & install instructions.
GPL © Martijn Boers