Ejemplo n.º 1
0
def extract_duplicates(optionparser=None):
    parser = cdd.createOptionParser() if (optionparser
                                          == None) else optionparser

    app = DuplicatesExtractor(parser)
    app.run()
    return app.extract_duplicates()
Ejemplo n.º 2
0
def get_option_parser(lang, srclocation):
    parser = cdd.createOptionParser()

    def parse_args():
        options = get_default_options()
        assert os.path.exists(srclocation), 'target src path is invalid'
        options.lang = lang
        args = [srclocation]
        return options, args

    # inject our own version of parse_args() function, that will return what
    # we teach him
    parser.parse_args = parse_args
    return parser
Ejemplo n.º 3
0
def get_option_parser(lang, srclocation):
    parser = cdd.createOptionParser()

    def parse_args():
        options = get_default_options()
        assert os.path.exists(srclocation), 'target src path is invalid'
        options.lang = lang
        args = [srclocation]
        return options, args

    # inject our own version of parse_args() function, that will return what
    # we teach him
    parser.parse_args = parse_args
    return parser
def extract_duplicates(optionparser=None):
    parser = cdd.createOptionParser() if (optionparser == None) else optionparser
    app = DuplicatesExtractor(parser)
    app.run()
    return app.extract_duplicates()