Updated README, added "persistant" option to config and command line.

This commit is contained in:
Michael Lazar
2015-09-20 22:56:24 -07:00
parent 80bf45078a
commit 44c4eeca62
4 changed files with 31 additions and 32 deletions

View File

@@ -38,8 +38,8 @@ def command_line():
parser.add_argument('-l', dest='link', help='full URL of a submission that will be opened on start')
parser.add_argument('--ascii', action='store_true', help='enable ascii-only mode')
parser.add_argument('--log', metavar='FILE', action='store', help='log HTTP requests to a file')
parser.add_argument('--refresh-token', dest='refresh_token', help='OAuth refresh token')
parser.add_argument('--clear-session', dest='clear_session', action='store_true', help='Remove any saved OAuth tokens before starting')
parser.add_argument('--non-persistant', dest='persistant', action='store_false', help='Forget all authenticated users when the program exits')
parser.add_argument('--clear-auth', dest='clear_auth', action='store_true', help='Remove any saved OAuth tokens before starting')
args = parser.parse_args()
return args
@@ -68,12 +68,12 @@ def main():
if args.ascii:
config.unicode = False
if not args.persistant:
config.persistant = False
if args.log:
logging.basicConfig(level=logging.DEBUG, filename=args.log)
if args.clear_session:
if args.clear_auth:
config.clear_refresh_token()
if args.refresh_token:
config.save_refresh_token(args.refresh_token)
try:
print('Connecting...')
@@ -111,4 +111,4 @@ def main():
# Explicitly close file descriptors opened by Tornado's IOLoop
tornado.ioloop.IOLoop.current().close(all_fds=True)
sys.exit(main())
sys.exit(main())