# -*- coding: utf-8 -*-12# Copyright 2018-2025 Mike Fährmann3#4# This program is free software; you can redistribute it and/or modify5# it under the terms of the GNU General Public License version 2 as6# published by the Free Software Foundation.78"""Post-processing modules"""910modules = [11"classify",12"compare",13"directory",14"exec",15"hash",16"metadata",17"mtime",18"python",19"rename",20"ugoira",21"zip",22]232425def find(name):26"""Return a postprocessor class with the given name"""27try:28return _cache[name]29except KeyError:30pass3132cls = None33if name in modules: # prevent unwanted imports34try:35module = __import__(name, globals(), None, None, 1)36except ImportError:37pass38else:39cls = module.__postprocessor__40_cache[name] = cls41return cls424344# --------------------------------------------------------------------45# internals4647_cache = {}484950