Giter Club home page Giter Club logo

blottertrax's Introduction

BlotterTrax

Reddit bot that uses streaming services to enforce popularity limits on new subreddit submissions, see in action.

Motivation

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.

Build status

Python application

Built with

  1. PRAW
  2. PyLast

Installation

  1. Copy the config example to config.ini cp conf/config.ini.dist conf/config.ini
  2. Create API account on Reddit, Last.fm, YouTube and SoundCloud
  3. Fill in the keys and passwords in the config/config.ini file
  4. Set REMOVE_SUBMISSIONS to true if you want to remove exceeding submission, otherwise it will create a rapport
  5. Set SEND_ARTIST_REPLY if you want the bot to reply with a last.fm artist bio
  6. Use Docker to build the image docker build -t blottertrax .
  7. Create a docker volume for the database docker volume create blottertrax
  8. Run the container with the volume attached 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

How to use?

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

Development

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)

Features

  • Using Youtube, Last.fm and Soundcloud for detecting submissions with exceeding listen count
  • Report self-promotion posts using username and submission title
  • Post artist tags, album information and social media links using Musicbrainz

Contribute

If you have features or bugfixes don't be shy to create a pull requests or bug report!

Credits

Thanks to:

License

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.