diff --git a/README.md b/README.md index 0cf77a2..f631bff 100644 --- a/README.md +++ b/README.md @@ -103,10 +103,11 @@ Add above line to your cron tab: ```crontab -e``` in Linux. Sync logs will be st # Headless authentication ---------------------------- -If you want to do the authentication process on a system without a display - such as a raspberry pi or a remote server, pass `--headless` or `-c` option to the authentication scripts. See below examples. +If you want to do the authentication process on a system without a display - such as a raspberry pi or a remote server, pass `--console` or `-c` option to the authentication scripts. See below examples. -`python3 auth_fitbit.py -i clientid -s clientsecret --headless` -`python3 auth_google.py -i clientid -s clientsecret --headless` +`python3 auth_fitbit.py -i clientid -s clientsecret --console` + +`python3 auth_google.py -i clientid -s clientsecret --console` Note : ------- diff --git a/auth/auth_fitbit.py b/auth/auth_fitbit.py index 7bc02e8..9703907 100755 --- a/auth/auth_fitbit.py +++ b/auth/auth_fitbit.py @@ -119,12 +119,12 @@ def main(): parser.add_argument("-i", "--id", required=True, help="Client id", metavar='') parser.add_argument("-s", "--secret", required=True, help="Client secret", metavar='') - parser.add_argument("-c", "--headless", default=False, + parser.add_argument("-c", "--console", default=False, help="Authenticate only using console (for headless systems)", action="store_true") args = parser.parse_args() server = OAuth2Server(args.id, args.secret) - if args.headless: + if args.console: server.headless_authorize() else: server.browser_authorize() diff --git a/auth/auth_google.py b/auth/auth_google.py index 2d7f5dc..5a26c37 100755 --- a/auth/auth_google.py +++ b/auth/auth_google.py @@ -12,7 +12,7 @@ def main(): parser.add_argument("-i", "--id", required=True, help="Client id", metavar='') parser.add_argument("-s", "--secret", required=True, help="Client secret", metavar='') - parser.add_argument("-c", "--headless", default=False, + parser.add_argument("-c", "--console", default=False, help="Authenticate only using console (for headless systems)", action="store_true") args = parser.parse_args() @@ -24,7 +24,7 @@ def main(): flow = OAuth2WebServerFlow(args.id, args.secret, scopes) storage = Storage('google.json') - flags = ['--noauth_local_webserver'] if args.headless else [] + flags = ['--noauth_local_webserver'] if args.console else [] run_flow(flow, storage, argparser.parse_args(flags)) if __name__ == '__main__':