Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Give Subreddit Stats user the option to enter a subreddit name if he didn't include it in the arguments #14

Merged
merged 1 commit into from
Feb 28, 2013

Conversation

wtchen
Copy link
Contributor

@wtchen wtchen commented Feb 28, 2013

Changes

  • As described in title.
  • Prints out the name of the subreddit user is going to analyze. This is helpful since I've been in situations where the script is in the middle of analyzing submissions when I realize I've chosen the wrong subreddit to analyze.

Feel free to change whatever is necessary, and give feedback on the quality of this pull request.

@@ -450,7 +450,20 @@ def main():

options, args = parser.parse_args()
if len(args) != 1:
parser.error('Must provide subreddit')
print('Enter subreddit name:')
# Gets string that contains only alphanumeric characters (or "_") and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the subreddit validation as PRAW will raise an exception if the subreddit is not valid. Simpler is better. If you want to handle whatever exception is raised with an appropriate error message, that would be awesome.

@bboe
Copy link
Member

bboe commented Feb 28, 2013

Please address the inline comment. Otherwise I think this is an awesome addition.

@wtchen
Copy link
Contributor Author

wtchen commented Feb 28, 2013

Made requested changes.

bboe added a commit that referenced this pull request Feb 28, 2013
@bboe bboe merged commit 7449357 into praw-dev:master Feb 28, 2013
@bboe
Copy link
Member

bboe commented Feb 28, 2013

Merged, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants