def initialize(cfg):
    # import and initialize plugins
    plugin_utils.initialize_plugins(cfg['plugin_dirs'], cfg['load_plugins'])

    # entryparser callback is run here first to allow other
    # plugins register what file extensions can be used
    extensions = tools.run_callback(
        "entryparser",
        {'txt': blosxom_entry_parser},
        mappingfunc=lambda x, y: y,
        defaultfunc=lambda x: x)

    # go through the config.py and override entryparser extensions
    for ext, parser_module in cfg['entryparsers'].items():
        module, callable_name = parser_module.rsplit(':', 1)
        module = tools.importname(None, module)
        extensions[ext] = getattr(module, callable_name)

    # FIXME - this is a lousy place to store this
    cfg['extensions'] = extensions