示例#1
0
文件: Internal.py 项目: nbaztec/Qirc
 def build_parser(self):
     parser = SimpleArgumentParser(prog="!locate")
     parser.add_argument("-p", "--private", action="store_true", dest="private", default=False, help="Get results in private")
     group = parser.add_mutually_exclusive_group()
     group.add_argument("-i", "--ip", dest="ip", default=None, help="Locate using IP address", metavar="ABC.DEF.GHI.XYZ")
     group.add_argument("-c", "--coord", dest="coord", default=None, help="Locate using latitude and logitude", metavar="LAT,LONG") 
     return parser
示例#2
0
文件: External.py 项目: nbaztec/Qirc
 def build_parser(self):
     parser = SimpleArgumentParser(prog="!now")
     parser.add_argument("-p",
                         "--private",
                         action="store_true",
                         dest="private",
                         default=False,
                         help="Get results in private")
     group = parser.add_mutually_exclusive_group()
     group.add_argument("-u",
                        "--utc",
                        action="store_true",
                        dest="utc",
                        help="Get UTC time")
     group.add_argument("-t",
                        "--timestamp",
                        action="store_true",
                        dest="timestamp",
                        help="Get UNIX timestamp")
     parser.add_argument("int_timestamp",
                         default=0,
                         nargs="?",
                         type=int,
                         help="Decode a UNIX timestamp",
                         metavar="TIMESTAMP")
     return parser
示例#3
0
文件: External.py 项目: nbaztec/Qirc
 def build_parser(self):
     parser = SimpleArgumentParser(prog="!now")
     parser.add_argument("-p", "--private", action="store_true", dest="private", default=False, help="Get results in private")
     group = parser.add_mutually_exclusive_group()        
     group.add_argument("-u", "--utc", action="store_true", dest="utc", help="Get UTC time")
     group.add_argument("-t", "--timestamp", action="store_true", dest="timestamp", help="Get UNIX timestamp")
     parser.add_argument("int_timestamp", default=0, nargs="?", type=int, help="Decode a UNIX timestamp", metavar="TIMESTAMP")
     return parser
示例#4
0
文件: Commands.py 项目: nbaztec/Qirc
 def build_parser(self):
     parser = SimpleArgumentParser(prog="module")
     group = parser.add_mutually_exclusive_group()
     group.add_argument("-e", "--enable", dest="enable", action="store_true", help="Enable the module")
     group.add_argument("-d", "--disable", dest="disable", action="store_true", help="Disable the module")
     group.add_argument("-r", "--reload", dest="reload", action="store_true", help="Reload the module [Default: All]")
     
     parser.add_argument("-l", "--list", dest="list", action="store_true", help="List the modules [Default: All]")
     
     group = parser.add_mutually_exclusive_group()
     group.add_argument("-f", "--config", dest="config", action="store_true", help="Configuration")
     group.add_argument("-i", "--internal", dest="internal", action="store_true", help="Internal module")
     group.add_argument("-x", "--external", dest="external", action="store_true", help="External module")
     group.add_argument("-c", "--command", dest="command", action="store_true", help="Command module")
     
     parser.add_argument("keys", nargs="*", help="Module Key", metavar="KEY")
     return parser
示例#5
0
文件: Internal.py 项目: nbaztec/Qirc
 def build_parser(self):
     parser = SimpleArgumentParser(prog="!calc")
     parser.add_argument("-p", "--private", action="store_true", dest="private", default=False, help="Get results in private")
     group = parser.add_mutually_exclusive_group()
     group.add_argument("-w", "--wolf", action="store_true", dest="wolf", default=True, help="Calculate using wolfram alpha [Default]")
     group.add_argument("-g", "--google", action="store_true", dest="google", default=False, help="Calculate using google calc")
     parser.add_argument("args", nargs="+", help="Calculation to perform", metavar="calculation")        
     return parser
示例#6
0
文件: Internal.py 项目: nbaztec/Qirc
 def build_parser(self):
     parser = SimpleArgumentParser(prog="!quote")
     parser.add_argument("-p", "--private", action="store_true", dest="private", default=False, help="Get results in private")
     parser.add_argument("-t", "--result", type=int, dest="result", default=1, help="Get the N'th result", metavar="N")
     group = parser.add_mutually_exclusive_group()
     group.add_argument("-r", "--random", action="store_true", dest="random", default=True, help="Get a random quote[Default]")
     group.add_argument("-a", "--author", dest="author", nargs="+", default=None, help="Search a quote by the author", metavar="AUTHOR")
     group.add_argument("-s", "--search", dest="search", nargs="+", default=None, help="Search a quote by contents", metavar="TERM")        
     return parser
示例#7
0
文件: Internal.py 项目: nbaztec/Qirc
 def build_parser(self):
     parser = SimpleArgumentParser(prog="!vote")
     group = parser.add_mutually_exclusive_group() 
     parser.add_argument("-i", "--interval", type=int, dest="interval", default=15, help="Timeout interval N seconds (min 5)", metavar="N")
     parser.add_argument("-t", "--timeout", dest="timeout", default=None, help="Timeout for unbanning user (min: 15s)", metavar="N")
     parser.add_argument("-c", "--clear", action="store_true", dest="clear", default=False, help="Clear all pending timeout actions")
     group.add_argument("-k", "--kick", dest="kick", nargs="+", default=None, help="Kick the user")
     group.add_argument("-a", "--arma", dest="arma", nargs="+", default=None, help="Bring forth armageddon upon user (kickban)")        
     parser.add_argument("args", nargs="+", help="Vote question or reason", metavar="question")
     return parser
示例#8
0
文件: Internal.py 项目: nbaztec/Qirc
 def build_parser(self):
     parser = SimpleArgumentParser(prog="!user")
     parser.add_argument("-p", "--private", action="store_true", dest="private", default=False, help="Get results in private")
     group = parser.add_mutually_exclusive_group()
     group.add_argument("-c", "--clear", action="store_true", dest="clear", help="Clear messages for 'remind' or 'tell' [Admin]")
     group.add_argument("-s", "--seen", dest="seen", action="store_true", default=True, help="Check when a user was last seen [Default]")
     group.add_argument("-t", "--tell", dest="tell", help="Leave a message for the user", metavar="USER")
     group.add_argument("-r", "--remind", dest="remind", help="Set a reminder for self", metavar="XX(d,h,m,s)")
     parser.add_argument("args", nargs="+", help="Message", metavar="MESSAGE")
     return parser
示例#9
0
文件: Commands.py 项目: nbaztec/Qirc
 def build_parser(self):
     parser = SimpleArgumentParser(prog="users")
     group = parser.add_mutually_exclusive_group()        
     group.add_argument("-a", "--add", dest="add", help="Add to this group", metavar="GROUP")        
     group.add_argument("-r", "--remove", dest="remove", help="Remove from this group", metavar="GROUP")        
     group.add_argument("-l", "--list", dest="list", action="store_true", help="List the users of a bot")
     parser.add_argument("-c", "--channel", dest="chan", help="Channel for 'chan_mgr' group member", metavar="CHANNEL")
     parser.add_argument("-t", "--auth", dest="auth", action="store_true", help="Authority level for group (0-255)")
     parser.add_argument("-p", "--power", dest="power", action="store_true", help="Specify the powers")
     parser.add_argument("hostmasks", nargs="*", help="User's hostmask or powers (-p) or auth (-t)", metavar="HOSTMASK|POWER|AUTH")
     return parser
示例#10
0
文件: Internal.py 项目: nbaztec/Qirc
 def build_parser(self):
     parser = SimpleArgumentParser(prog="!define")
     parser.add_argument("-p", "--private", action="store_true", dest="private", default=False, help="Get results in private")
     parser.add_argument("-t", "--result", type=int, dest="result", default=1, help="Get the N'th result", metavar="N")
     group = parser.add_mutually_exclusive_group()
     group.add_argument("-u", "--urban", action="store_true", dest="urban", default=True, help="Define using urbandictionary [Default]")
     group.add_argument("-g", "--google", action="store_true", dest="google", default=False, help="Define using google")
     group.add_argument("-d", "--dictionary", action="store_true", dest="dictionary", default=False, help="Define using abbreviations.com")
     group.add_argument("-s", "--synonym", action="store_true", dest="synonym", default=False, help="Get synonyms of a word")
     #group.add_argument("-e", "--etymology", action="store_true", dest="etymology", default=False, help="Get origin of word")
     parser.add_argument("args", nargs="+", help="Query term", metavar="term")
     return parser
示例#11
0
文件: Internal.py 项目: nbaztec/Qirc
 def build_parser(self):
     parser = SimpleArgumentParser(prog="!url", prefix_chars="+-")
     parser.add_argument("-p", "--private", action="store_true", dest="private", default=False, help="Get results in private")
     group = parser.add_mutually_exclusive_group()
     group.add_argument("-l", "--list", action="store_true", dest="list", default=False, help="Print the url")        
     group.add_argument("-d", "--dns", action="store_true", dest="dns", default=True, help="Perform DNS lookup on an url [Default]")
     group.add_argument("-t", "--title", action="store_true", dest="title", default=False, help="Fetch the url title")
     group.add_argument("-v", "--preview", action="store_true", dest="preview", default=False, help="Get a sneak peak into the page")
     group.add_argument("-c", "--content", action="store_true", dest="content", default=False, help="Gets the content type of the url")
     group.add_argument("-s", "--short", action="store_true", dest="short", default=False, help="Get the goo.gl short url")
     group.add_argument("-e", "--expand", action="store_true", dest="expand", default=False, help="Expand a goo.gl short url")        
     group.add_argument("-o", "--port", type=int, dest="port", help="Check if the port is open on a server", metavar="PORT")
     parser.add_argument("args", help="URL or a relative reference", metavar="[url|%{1-5}]")        
     return parser
示例#12
0
文件: Internal.py 项目: nbaztec/Qirc
 def build_parser(self):
     parser = SimpleArgumentParser(prog="!search")
     parser.add_argument("-p", "--private", action="store_true", dest="private", default=False, help="Get results in private")
     parser.add_argument("-t", "--result", type=int, dest="result", default=1, help="Get the N'th result", metavar="N")
     parser.add_argument("-v", "--verbose", action="store_true", dest="verbose", help="Output textual descriptions")
     group = parser.add_mutually_exclusive_group()
     group.add_argument("-g", "--google", action="store_true", dest="google", default=True, help="Search on Google [Default]")
     group.add_argument("-i", "--gimage", action="store_true", dest="gimage", default=False, help="Search on Google Images")
     group.add_argument("-y", "--youtube", action="store_true", dest="youtube", default=False, help="Search on Youtube")
     group.add_argument("-w", "--wiki", action="store_true", dest="wiki", default=False, help="Search on Wikipedia")
     group.add_argument("-m", "--imdb", action="store_true", dest="imdb", default=False, help="Search on IMDB")
     group.add_argument("-f", "--tdf", action="store_true", dest="tdf", default=False, help="Search on TDF")
     group.add_argument("-c", "--custom", dest="custom", default=None, help="Search on a custom site")
     parser.add_argument("args", nargs="+", help="Search query", metavar="query")        
     return parser