PRAWtools is a collection of tools that utilize reddit's API through the Python Reddit API Wrapper (PRAW). PRAWtools is currently made up of two utillities:
- modutils
- subreddit_stats
sudo apt-get install python-setuptools
sudo easy_install pip
sudo pip install prawtools
sudo pacman -S python-pip
sudo easy_install pip
sudo pip install prawtools
sudo easy_install pip
sudo pip install prawtools
modutils is a tool to assist Reddit community moderators in moderating their community. At present, it is mostly useful for automatically building flair templates from existing user flair, however, it can also be used to quickly list banned users, contributors, and moderators.
Note: all examples require you to be a moderator for the subreddit
-
List banned users for subreddit foo
modutils -l banned foo
-
Get current flair for subreddit bar
modutils -f bar
-
Synchronize flair templates with existing flair for subreddit baz, building non-editable templates for any flair whose flair-text is common among at least 2 users.
modutils --sync --ignore-css --limit=2 baz
-
Send a message to approved submitters of subreddit blah. You will be prompted for the message, and asked to verify prior to sending the messages.
modutils --message contributors --subject "The message subject" blah
subreddit_stats is a tool to provide basic statistics on a subreddit. To see the what sort of output subreddit stats generates check out /r/subreddit_stats.
-
Generate stats for subreddit foo for the last 30 days with extra verbose output. Post results to subreddit bar as user user.
subreddit_stats -d30 -vv -R bar -u user foo
-
Generate stats for subreddit blah for the top posts of the year. Post the results to the same subreddit as user resu.
subreddit_stats --top year -u resu blah
-
To see other possible options
subreddit_stats --help