def make_parser(self): parser = ArgumentParser(prog=self.name(), description=self.description()) parser.add_argument("-ws", "--workspace", choices=Config.get().workspaces(), help="Check auth for specified workspace.") return parser
def make_parser(self): parser = ArgumentParser(prog=self.name(), description=self.description()) parser.add_argument("-l", "--level", choices=Logger.level_names(), help="Set another log level.") return parser
def make_parser(self): parser = ArgumentParser(prog=self.name(), description=self.description()) parser.add_argument("-c", "--channel", type=str, help="Channel ID to post to.") parser.add_argument("text", type=str, help="Text to post.") return parser
def make_parser(self): parser = ArgumentParser(prog=self.name(), description=self.description()) parser.add_argument("-c", "--channel", type=str, help="Channel ID to post to.") parser.add_argument("--as-user", action="store_true", help="Post as authed user instead of as bot.") parser.add_argument("-u", "--user", type=str, help="Bot user name to use. Must be specified when not using --as-user.") parser.add_argument("--no-markdown", action="store_true", help="Disable Slack markup parsing.") parser.add_argument("text", type=str, help="Text to post.") return parser
def make_parser(self): parser = ArgumentParser(prog=self.name(), description=self.description()) parser.add_argument("-p", "--path", type=str, help="Local file path where to save emojis to") parser.add_argument("-q", "--quiet", action="store_true", help="Don't print response from Slack API") return parser
def make_parser(self): self.__find_and_sort() choices = [] for instance in self.__instances: choices.append(instance.name()) parser = ArgumentParser(prog=self.name(), description=self.description()) parser.add_argument( "command", type=str, nargs="?", choices=choices, metavar="command", help="Get help on a specific command (same as 'command --help'). " "Valid choices: {}".format(choices)) return parser
def make_parser(self): parser = ArgumentParser(prog=self.name(), description=self.description()) parser.add_argument("-c", "--channel", type=str, help="Channel ID to post to.") parser.add_argument("-u", "--user", type=str, help="User ID to post ephemeral message to.") parser.add_argument("--as-user", action="store_true", help="Post as authed user instead of as bot.") parser.add_argument("text", type=str, help="Text to post.") return parser
def make_parser(self): parser = ArgumentParser(prog=self.name(), description=self.description()) parser.add_argument("-l", "--limit", type=int, default=50, help="Maximum number of users to return per page (defaults to 50).") parser.add_argument("-n", "--no-follow", action="store_true", help="Don't follow cursors.") parser.add_argument("--include-locale", action="store_true", help="Include locale of users.") return parser
def make_parser(self): parser = ArgumentParser(prog=self.name(), description=self.description()) parser.add_argument("-l", "--limit", type=int, default=50, help="Maximum number of channels to return per page (defaults to 50).") parser.add_argument("-n", "--no-follow", action="store_true", help="Don't follow cursors.") parser.add_argument("--exclude-archived", action="store_true", help="Exclude archived channels.") return parser
def make_parser(self): parser = ArgumentParser(prog=self.name(), description=self.description()) parser.add_argument("--set-read-only", dest="read_only", action="store_true", help="Set read-only mode.") parser.add_argument("--unset-read-only", dest="read_only", action="store_false", help="Unset read-only mode.") parser.add_argument("--reset", action="store_true", help="Reset all config values to default and exit slacker (be careful!).") parser.set_defaults(read_only=None) return parser
def make_parser(self): file_types = ["all", "spaces", "snippets", "images", "gdocs", "zips", "pdfs"] parser = ArgumentParser(prog=self.name(), description=self.description(), epilog="NOTE: It is recommended to first use --dry-run to see what " "will be deleted!") parser.add_argument("-n", "--dry-run", action="store_true", help="Don't actually delete any files but show which ones would have " "been deleted.") parser.add_argument("-t", "--types", nargs="*", type=str, metavar="TYPE", choices=file_types, default="all", help="Delete files by types (defaults to 'all'). All possible values " "are: {}. Specify multiple like '-t images gdocs'." .format(file_types)) parser.add_argument("--days-old", type=int, metavar="DAYS", help="Delete files with an age in days less than or equal to input " "amount.") parser.add_argument("--older-than", type=int, metavar="DAYS", help="Delete files that are older than input amount of days.") return parser
def make_parser(self): parser = ArgumentParser(prog=self.name(), description="Displays predefined workspaces.") parser.add_argument("-s", "--set", metavar="WORKSPACE", help="Set another workspace active.") parser.add_argument("-c", "--create", action="store_true", help="Create a workspace.") parser.add_argument("-r", "--remove", metavar="WORKSPACE", help="Remove a workspace.") return parser
def make_parser(self): file_types = [ "all", "spaces", "snippets", "images", "gdocs", "zips", "pdfs" ] parser = ArgumentParser(prog=self.name(), description=self.description()) parser.add_argument( "-a", "--all", action="store_true", help= "Return all files. This will disregard --page but still respects " "filtering.") parser.add_argument( "-c", "--count", type=int, choices=range(1, 500), default=100, metavar="COUNT", help="Number of items to return per page between 1 and 500 " "(defaults to 100).") parser.add_argument( "-p", "--page", type=int, default=1, help="Page number of results to return (defaults to 1).") parser.add_argument( "-t", "--types", nargs="*", type=str, metavar="TYPE", choices=file_types, default="all", help= "Filter files by types (defaults to 'all'). All possible values " "are: {}. Specify multiple like '-t images gdocs'.".format( file_types)) parser.add_argument( "--days-old", type=int, metavar="DAYS", help= "Show only files with an age in days less than or equal to input " "amount.") parser.add_argument( "--older-than", type=int, metavar="DAYS", help="Show only files that are older than input amount of days.") parser.add_argument( "--total-size", action="store_true", help="Compute total file size and don't print file names. Implies " "--all and disregards filtering. Disables --download.") parser.add_argument( "-u", "--user", type=str, help="Filter for files uploaded by a specific user.") parser.add_argument( "-d", "--download", type=str, metavar="DIR", help="Download filtered files to a specific folder. Disables " "--total-size.") return parser
def make_parser(self): parser = ArgumentParser(prog=self.name(), description=self.description()) parser.add_argument("-a", "--all", action="store_true", help="Invite all users to channel.") parser.add_argument("-u", "--user", type=str, help="User ID to send invite to.") parser.add_argument("channel", type=str, help="Channel ID to invite user to.") return parser