Docstring edits.

This commit is contained in:
Michael Lazar
2015-02-20 22:51:26 -08:00
parent f39fc9cce4
commit 9917d61a3f

22
main.py
View File

@@ -7,15 +7,27 @@ from rtv.utils import curses_session
from rtv.subreddit import SubredditPage from rtv.subreddit import SubredditPage
from rtv.submission import SubmissionPage from rtv.submission import SubmissionPage
description = """
Reddit Terminal Viewer is a lightweight browser for www.reddit.com built into a
terminal window.
"""
epilog = """
controls:
arrow keys navigate submissions and open comments
q quit
F5 refresh the page
/ open a prompt to switch subreddits
"""
def main(): def main():
description = ( parser = argparse.ArgumentParser(
"Reddit Terminal Viewer (RTV) is a python application that enables " prog='rtv', description=description, epilog=epilog,
"browsing content from Reddit (www.reddit.com) in a terminal window.") formatter_class=argparse.RawDescriptionHelpFormatter)
parser = argparse.ArgumentParser(prog='rtv', description=description)
parser.add_argument('-s', dest='subreddit', default='front', help='subreddit name') parser.add_argument('-s', dest='subreddit', default='front', help='subreddit name')
parser.add_argument('-l', dest='link', help='full link to a submission') parser.add_argument('-l', dest='link', help='full link to a submission')
group = parser.add_argument_group('authentication (optional)') group = parser.add_argument_group('authentication (optional)')
group.add_argument('-u', dest='username', help='reddit username') group.add_argument('-u', dest='username', help='reddit username')
group.add_argument('-p', dest='password', help='reddit password') group.add_argument('-p', dest='password', help='reddit password')