def __init__(self, *args, **kwargs): super(DemosArgParser, self).__init__(*args, **kwargs) self.description = "Run a yowsup demo" configGroup = self.add_argument_group("Configuration options for demos") credentialsOpts = configGroup.add_mutually_exclusive_group() credentialsOpts.add_argument("-l", "--login", action="store", metavar="phone:b64password", help = "WhatsApp login credentials, in the format phonenumber:password, where password is base64 encoded.") credentialsOpts.add_argument("-c", "--config", action="store", help = "Path to config file containing authentication info. For more info about config format use --help-config") configGroup.add_argument('-E', '--env', action = "store", help = "Set the environment yowsup simulates", choices = YowsupEnv.getRegisteredEnvs()) configGroup.add_argument("-M", "--unmoxie", action="store_true", help="Disable E2E Encryption") cmdopts = self.add_argument_group("Command line interface demo") cmdopts.add_argument('-y', '--yowsup', action = "store_true", help = "Start the Yowsup command line client") echoOpts = self.add_argument_group("Echo client demo") echoOpts.add_argument('-e', '--echo', action = "store_true", help = "Start the Yowsup Echo client") sendOpts = self.add_argument_group("Send client demo") sendOpts.add_argument('-s', '--send', action="store", help = "Send a message to specified phone number, " "wait for server receipt and exit", metavar=("phone", "message"), nargs = 2) syncContacts = self.add_argument_group("Sync contacts") syncContacts.add_argument('-S','--sync', action = "store" , help = "Sync ( check valid ) whatsapp contacts",metavar =("contacts"))
def __init__(self, *args, **kwargs): super(RegistrationArgParser, self).__init__(*args, **kwargs) self.description = "WhatsApp Registration options" configGroup = self.add_argument_group("Configuration options", description = "Config file is optional. Other configuration arguments have higher priority if given, and will override those specified in the config file") configGroup.add_argument("-c", '--config', action = "store", help = 'Path to config file. If this is not set then you must set at least --phone and --cc arguments') configGroup.add_argument('-E', '--env', action = "store", help = "Set the environment yowsup simulates", choices = YowsupEnv.getRegisteredEnvs()) configGroup.add_argument("-m", '--mcc', action = "store", help = "Mobile Country Code. Check your mcc here: https://en.wikipedia.org/wiki/Mobile_country_code") configGroup.add_argument("-n", '--mnc', action = "store", help = "Mobile Network Code. Check your mnc from https://en.wikipedia.org/wiki/Mobile_country_code") # configGroup.add_argument("-M", '--sim-mcc', # action = "store", # help = "Mobile Country Code. Check your mcc here: https://en.wikipedia.org/wiki/Mobile_country_code" # ) # configGroup.add_argument("-N", '--sim-mnc', # action= "store", # help = "SIM MNC" # ) configGroup.add_argument("-p", '--phone', action= "store", help = " Your full phone number including the country code you defined in 'cc', without preceeding '+' or '00'") configGroup.add_argument("-C", '--cc', action = "store", help = "Country code. See http://www.ipipi.com/networkList.do. This is now required") # configGroup.add_argument("-i", '--id', # action="store", # help = "Identity" # ) regSteps = self.add_argument_group("Modes") regSteps = regSteps.add_mutually_exclusive_group() regSteps.add_argument("-r", '--requestcode', help='Request the digit registration code from Whatsapp.', action="store", required=False, metavar="(sms|voice)") regSteps.add_argument("-R", '--register', help='Register account on Whatsapp using the code you previously received', action="store", required=False, metavar="code")
def __init__(self, *args, **kwargs): super(DemosArgParser, self).__init__(*args, **kwargs) self.description = "Run a yowsup demo" configGroup = self.add_argument_group( "Configuration options for demos") credentialsOpts = configGroup.add_mutually_exclusive_group() credentialsOpts.add_argument( "-l", "--login", action="store", metavar="phone:b64password", help= "WhatsApp login credentials, in the format phonenumber:password, where password is base64 encoded." ) credentialsOpts.add_argument( "-c", "--config", action="store", help= "Path to config file containing authentication info. For more info about config format use --help-config" ) configGroup.add_argument('-E', '--env', action="store", help="Set the environment yowsup simulates", choices=YowsupEnv.getRegisteredEnvs()) configGroup.add_argument("-M", "--unmoxie", action="store_true", help="Disable E2E Encryption") cmdopts = self.add_argument_group("Command line interface demo") cmdopts.add_argument('-n', '--news', action="store", metavar="date", help="Start the news bot")
def __init__(self, *args, **kwargs): super(RegistrationArgParser, self).__init__(*args, **kwargs) self.description = "WhatsApp registration options" configGroup = self.add_argument_group( "Configuration options", description= "Config file is optional. Other configuration arguments have higher priority if given, and will override those specified in the config file" ) configGroup.add_argument( "-c", '--config', action="store", help= 'Path to config file. If this is not set then you must set at least --phone and --cc arguments' ) configGroup.add_argument('-E', '--env', action="store", help="Set the environment yowsup simulates", choices=YowsupEnv.getRegisteredEnvs()) configGroup.add_argument( "-m", '--mcc', action="store", help= "Mobile Country Code. Check your mcc here: https://en.wikipedia.org/wiki/Mobile_country_code" ) configGroup.add_argument( "-n", '--mnc', action="store", help= "Mobile Network Code. Check your mnc from https://en.wikipedia.org/wiki/Mobile_country_code" ) configGroup.add_argument( "-p", '--phone', action="store", help= " Your full phone number including the country code you defined in 'cc', without preceeding '+' or '00'" ) configGroup.add_argument( "-C", '--cc', action="store", help= "Country code. See http://www.ipipi.com/networkList.do. This is now required" ) regSteps = self.add_argument_group("Modes") regSteps = regSteps.add_mutually_exclusive_group() regSteps.add_argument( "-r", '--requestcode', help='Request the digit registration code from Whatsapp.', action="store", required=False, metavar="(sms|voice)") regSteps.add_argument( "-R", '--register', help= 'Register account on Whatsapp using the code you previously received', action="store", required=False, metavar="code")