def clean(args):
    yaml.add_representer(CleanFilter, clean_filter_representer)
    yaml.add_constructor(u'!Filter', clean_filter_constructor)
    yaml.add_representer(CleanSecret, clean_secret_representer)
    yaml.add_constructor(u'!Secret', clean_secret_constructor)

    f = load_filter(args.name, args.filters)
    if f is None:
        logger.debug("Could not load any filter named '%s'." % args.name)
        return
    while 1:
        try:
            line = args.input.readline()
        except KeyboardInterrupt:
            break
        if not line:
            break
        args.output.write(f.sub(line))
dataset/ETHPy150Open oohlaf/dotsecrets/dotsecrets/clean.py/clean/original