Skip to content

petrarch1603/MapPornBot

Repository files navigation

/r/MapPorn RedditBot

The MapPorn Redditbot is a suite of scripts that help automate and simplify moderation at /r/MapPorn.

Map Contest Tools

Every month we have a monthly map contest at /r/MapPorn. Users can submit a map at any time. On the landing page for the contest users are instructed to send a submission to a Reddit bot's inbox.

A raspberry pi runs the script checkforsubmissions.py every hour checking that inbox. When the bot receives a submission, it parses the message and adds a new line to a csv with the following fields:

  • Map Name
  • Map Image URL
  • Map Description
  • Map Author
  • Unique identifier for the submission

This CSV is used to create a Reddit contest post at the end of the month. The manually run script votingpost.py reads this CSV and creates a comment for each map submission. Users can upvote or downvote each comment.

While this is going on the CSV is renamed to submissions_current. That way if the RedditBot receives a new map submission it won't be confused in the current queue of maps being voted on.

After about a week, the contest ends. Then the script congratulations.py is manually run. This script gets the four highest rated comments (maps) and uses that data to make a new post to congratulate the winners. The CSV of submissions from that month is archived for a yearly contest at the end of the year.

Rules and information about the contest can be found here

Social Media Tools

Part of MapPorn's mission is to share maps across the internet. This means using platforms other than Reddit. In the python file functions.py there are functions for taking posts from /r/MapPorn and posting to Twitter, Tumblr and Facebook simultaneously. These functions use official APIs to interact with and post a link to a Reddit post to those accounts.

Some other social media scripts include:

Notes

See requirements.txt for full list of requirements. These scripts utilize PRAW, Tweepy, PyTumblr and Facebook-sdk. These packages require authorization tokens that are not provided in this repository.

Created by /u/Petrarch1603
2017 October

About

The repository for the MapPorn bot on Reddit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages