This repository has been archived by the owner on Jun 9, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to use the renamed PRAW package. Also add setup.py.
- Loading branch information
Showing
4 changed files
with
60 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
*~ | ||
*.egg | ||
*.pyc | ||
.coverage | ||
*.egg-info/ | ||
_build/ | ||
build/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,30 @@ | ||
Introduction | ||
--- | ||
# Introduction | ||
|
||
subreddit_stats.py 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](http://www.reddit.com/r/subreddit_stats). | ||
|
||
subreddit_stats.py depends on | ||
[the python reddit api wrapper](/mellort/reddit_api). | ||
# Installation | ||
|
||
Examples | ||
--- | ||
## Ubuntu/debian installation | ||
|
||
sudo apt-get install python-setuptools | ||
sudo easy_install pip | ||
sudo pip install subreddit_stats | ||
|
||
## Mac OS X installation (only tested with Lion) | ||
|
||
sudo easy_install pip | ||
sudo pip install subreddit_stats | ||
|
||
# Examples of how to run subreddit_stats | ||
|
||
0. Generate stats for subreddit __foo__ for the last 30 days with extra | ||
verbose output. Post results to subreddit __bar__ as user __user__. | ||
|
||
``` | ||
./subreddit_stats.py -d30 -vv -R bar -u user foo | ||
``` | ||
subreddit_stats -d30 -vv -R bar -u user foo | ||
|
||
0. 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import os | ||
import re | ||
from setuptools import setup | ||
|
||
HERE = os.path.abspath(os.path.dirname(__file__)) | ||
MODULE_FILE = os.path.join(HERE, 'subreddit_stats.py') | ||
README = open(os.path.join(HERE, 'README.md')) | ||
VERSION = re.search("__version__ = '([^']+)'", | ||
open(MODULE_FILE).read()).group(1) | ||
|
||
|
||
setup(name='subreddit_stats', | ||
version=VERSION, | ||
author='Bryce Boe', | ||
author_email='bbzbryce@gmail.com', | ||
url='https://github.com/praw-dev/subreddit_stats', | ||
description=('A tool to calculate various submission and comment ' | ||
'statistics on reddit communities.'), | ||
long_description=README, | ||
keywords = 'reddit subreddit statistics', | ||
classifiers=['Programming Language :: Python'], | ||
install_requires=['praw'], | ||
py_modules=['subreddit_stats'], | ||
entry_points = {'console_scripts': | ||
['subreddit_stats = subreddit_stats:main']}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters