diff --git a/rtv/__main__.py b/rtv/__main__.py index a44d87f..86f92b7 100644 --- a/rtv/__main__.py +++ b/rtv/__main__.py @@ -45,8 +45,8 @@ def command_line(): parser.add_argument('-l', dest='link', help='full link to a submission') parser.add_argument('--unicode', action='store_true', help='enable unicode (experimental)') - parser.add_argument('--log', action='store', - help='Log all HTTP requests to the given file') + parser.add_argument('--log', metavar='FILE', action='store', + help='Log HTTP requests') group = parser.add_argument_group('authentication (optional)', AUTH) group.add_argument('-u', dest='username', help='reddit username') @@ -102,4 +102,4 @@ def main(): except KeyboardInterrupt: return -sys.exit(main()) \ No newline at end of file +sys.exit(main()) diff --git a/rtv/curses_helpers.py b/rtv/curses_helpers.py index ac37ff2..ab151cd 100644 --- a/rtv/curses_helpers.py +++ b/rtv/curses_helpers.py @@ -3,6 +3,7 @@ import time import threading import curses from curses import textpad, ascii +from contextlib import contextmanager from .docs import HELP from .helpers import strip_textpad @@ -272,4 +273,4 @@ def curses_session(): stdscr.keypad(0) curses.echo() curses.nocbreak() - curses.endwin() \ No newline at end of file + curses.endwin() diff --git a/rtv/docs.py b/rtv/docs.py index bd3d85d..22f2e37 100644 --- a/rtv/docs.py +++ b/rtv/docs.py @@ -11,10 +11,9 @@ Reddit Terminal Viewer is a lightweight browser for www.reddit.com built into a terminal window. """ -AUTH = """ -Authenticating is required to vote and leave comments. For added security, it -is recommended that only you only provide a username. There will be an -additional prompt for the password if it is not provided. +AUTH = """\ +Authenticating is required to vote and leave comments. If only a username is +given, the program will display a secure prompt to enter a password. """ CONTROLS = """ @@ -43,4 +42,4 @@ Subreddit Mode Submission Mode `LEFT` or `h` : Return to subreddit mode `RIGHT` or `l` : Fold the selected comment, or load additional comments -""" \ No newline at end of file +""" diff --git a/rtv/submission.py b/rtv/submission.py index 5cc35ac..f33ebce 100644 --- a/rtv/submission.py +++ b/rtv/submission.py @@ -6,9 +6,9 @@ import praw.errors from .content import SubmissionContent from .page import BasePage -from .workers import LoadScreen, open_browser -from .curses_helpers import (BULLET, UARROW, DARROW, Color, show_help, - text_input) +from .helpers import clean, open_browser +from .curses_helpers import (BULLET, UARROW, DARROW, Color, LoadScreen, + show_help, text_input) __all__ = ['SubmissionPage'] @@ -280,4 +280,4 @@ class SubmissionPage(BasePage): display_message(self.stdscr, [e.message]) else: time.sleep(0.5) - self.refresh_content() \ No newline at end of file + self.refresh_content() diff --git a/rtv/subreddit.py b/rtv/subreddit.py index 4fcd739..0436539 100644 --- a/rtv/subreddit.py +++ b/rtv/subreddit.py @@ -7,9 +7,9 @@ from .exceptions import SubredditError from .page import BasePage from .submission import SubmissionPage from .content import SubredditContent -from .workers import LoadScreen, open_browser -from .curses_helpers import (BULLET, UARROW, DARROW, Color, text_input, - show_notification, show_help) +from .helpers import clean, open_browser +from .curses_helpers import (BULLET, UARROW, DARROW, Color, LoadScreen, + text_input, show_notification, show_help) __all__ = ['opened_links', 'SubredditPage']