Exemple #1
0
    def addOptions(self):
        self.parser.add_option("--not-equal",
                               action="store_true",
                               default=False,
                               dest="notequal",
                               help="Allow source and destination to have different names")
        self.parser.add_option("--debug",
                               action="store_true",
                               default=False,
                               dest="debug",
                               help="Debug the comparing process")
        self.parser.add_option("--long-field-threshold",
                               action="store",
                               type="int",
                               default=None,
                               dest="longlist",
                               help="Fields that are longer than this won't be parsed, but read into memory (and compared as strings)")

        CommonParserOptions.addOptions(self)
Exemple #2
0
    def addOptions(self):
        self.parser.add_option("--interactive",
                               action="store_true",
                               default=True,
                               dest="interactive",
                               help="Asks the user before applying changes")

        self.parser.add_option("--batch",
                               action="store_false",
                               default=True,
                               dest="interactive",
                               help="Don't ask the user before applying changes")

        self.parser.add_option("--clear-unused",
                               action="store_true",
                               default=False,
                               dest="clear",
                               help="Removes all the dictionary entries that are not in the source")
        
        self.parser.add_option("--add-missing",
                               action="store_true",
                               default=False,
                               dest="add",
                               help="Add all the dictionary entries that are not in the destination")
        
        self.parser.add_option("--append-lists",
                               action="store_true",
                               default=False,
                               dest="append",
                               help="Append to lists if they are shorter than the original")

        self.parser.add_option("--shorten-lists",
                               action="store_true",
                               default=False,
                               dest="shorten",
                               help="Shortens lists if they are longer than the original")

        self.parser.add_option("--all",
                               action="store_true",
                               default=False,
                               dest="all",
                               help="Do all the editing commands: clear, add, shorten and append")

        self.parser.add_option("--test",
                               action="store_true",
                               default=False,
                               dest="test",
                               help="Does not write the file but only prints it to the screen")

        self.parser.add_option("--not-equal",
                               action="store_true",
                               default=False,
                               dest="notequal",
                               help="Allow source and destination to have different names")

        self.parser.add_option("--verbose",
                               action="store_true",
                               default=False,
                               dest="verbose",
                               help="Print every change that is being made")

        self.parser.add_option("--min-recursion",
                               action="store",
                               default=0,
                               type="int",
                               dest="min",
                               help="Minimum depth of the recursive decent into dictionaries at which 'editing' should start (default: %default)")
        
        self.parser.add_option("--max-recursion",
                               action="store",
                               default=100,
                               type="int",
                               dest="max",
                               help="Maximum depth of the recursive decent into dictionaries (default: %default)")

        CommonParserOptions.addOptions(self)
Exemple #3
0
 def addOptions(self):
     CommonParserOptions.addOptions(self)