Commits

mickael9 committed f569cd3

Put authentification arguments in a group

Comments (0)

Files changed (1)

 home = os.getenv('USERPROFILE') or os.getenv('HOME')
 
 parser = argparse.ArgumentParser(description="A simple ge.tt uploader")
-parser.add_argument('file', nargs='*', type=argparse.FileType('rb'), help="Name of the file to upload")
+parser.add_argument('file', nargs='*', type=argparse.FileType('rb'), help="Name of a file to upload")
 parser.add_argument('-t', dest='title', help='Title of the share (defaults to first file name)')
 parser.add_argument('-s', dest='share', help='Name of the share to upload to (defaults to a newly created one)')
-parser.add_argument('-e', dest='email', help='Email to login with')
-parser.add_argument('-p', dest='password', help='Password to login with')
-parser.add_argument('-k', dest='tokenfile', help='Ge.tt token file path (~/.gett-token)', default=os.path.join(home, '.gett-token'))
 parser.add_argument('-D', dest='debug', action='store_true', help='Debug API calls')
 parser.add_argument('--delete', nargs=1, dest='share_or_file', help='Delete a share or a file (url or path)')
 
+auth_group = parser.add_argument_group('Authentification (optional)')
+auth_group.add_argument('-e', dest='email', help='Email to login with')
+auth_group.add_argument('-p', dest='password', help='Password to login with')
+auth_group.add_argument('-k', dest='tokenfile', help='Ge.tt token file path (~/.gett-token)', default=os.path.join(home, '.gett-token'))
+
 args = parser.parse_args()
 
 if args.debug: