def add_arguments(self, parser: CommandParser):
        group = parser.add_mutually_exclusive_group()

        group2 = group.add_argument_group(title='file import')
        group2.add_argument('file', help='edge property file', nargs='?')
        group2.add_argument('-f', '--format', help='file format', type=str)
        group2.add_argument('-U', '--undirected', help='treat edges as undirected', action='store_true')

        group.add_argument('--clear-all', help='clear all edges', action='store_true')
        group.add_argument('--clear', help='clear edge', type=str)
        group.add_argument('-l', '--list', action='store_true')
Example #2
0
    def add_arguments(self, parser: CommandParser):
        parser.add_argument(
            "--delete",
            help="delete data from database if it doesn't appear in import",
            action="store_true")
        parser.add_argument("-d",
                            "--dry-run",
                            help="print changes only",
                            action="store_true")
        group = parser.add_mutually_exclusive_group(required=True)

        group.add_argument("-i", "--input", help="annotation file")
        group.add_argument("-o", "--output", help="export current annotations")
Example #3
0
    def add_arguments(self, parser: CommandParser) -> None:
        self.add_general_args(parser, default=None)
        self.add_ca(parser, "ca", allow_disabled=True)
        self.add_acme_group(parser)
        self.add_ca_args(parser)

        group = parser.add_mutually_exclusive_group()
        group.add_argument(
            "--enable",
            action="store_true",
            dest="enabled",
            default=None,
            help="Enable the certificate authority.",
        )
        group.add_argument(
            "--disable", action="store_false", dest="enabled", help="Disable the certificate authority."
        )
Example #4
0
 def add_arguments(self, parser: CommandParser):
     group = parser.add_mutually_exclusive_group()
     group.add_argument(
         f'--{self.baseNameOption}',
         default=datetime.now().strftime(KeyFileUtils.timestampFormat),
         type=str,
         required=False,
         help='Base file name of the key file(s) generated. '
         'Default: timestamp of '
         f'"{KeyFileUtils.timestampFormat.replace("%", "%%")}"',
         dest=self.baseNameOption)
     group.add_argument(
         f'--{self.dumpOption}',
         action='store_true',
         default=False,
         required=False,
         help='Dump the JWK JSON to stdout instead of writing it to a file',
         dest=self.dumpOption)
Example #5
0
 def add_arguments(self, parser: CommandParser):
     group = parser.add_mutually_exclusive_group()
     group.add_argument('-l', '--list', help="List metadata fields. Searchable fields marked with '*'.",
                        action="store_true")
     group.add_argument('-a', '--add', nargs='+', help='make fields searchable')
     group.add_argument('-r', '--remove', nargs='+', help='make fields not searchable')