I am new to command line tools. I am trying to build a Google Drive command line client. I am trying to use Docopt. This is what my main file looks like:
"""
GDR Google Drive Command Line Client.
Usage:
gdr.py about
gdr.py upload <filename>
gdr.py listall
gdr.py search <keyword>
gdr.py -h | --help
gdr.py --version
Options:
-h --help Show this screen.
--version Show version.
"""
from docopt import docopt
from Commands.about import About
if __name__ == '__main__':
arguments = docopt(__doc__)
print(arguments)
if arguments['about'] == True:
About.aboutMe()
It works perfectly until I call aboutMe() method. But when I call it I get the following error:
Himanshu-Mac:GDrive himanshu$ python gdr.py about
usage: gdr.py [-h] [--auth_host_name AUTH_HOST_NAME]
[--noauth_local_webserver]
[--auth_host_port [AUTH_HOST_PORT [AUTH_HOST_PORT ...]]]
[--logging_level {DEBUG,INFO,WARNING,ERROR,CRITICAL}]
gdr.py: error: unrecognized arguments: about
Where is the problem? I need help in this. And also this is my first question on stackoverflow so apologies if my format is not correct.