def prepare_logo()

in source/ext/extref.py [0:0]


def prepare_logo(app, config):
    extref_logo_dir = os.path.join(app.outdir, config.extref_images_dir, LOGO_DIR)
    if not os.path.isdir(extref_logo_dir):
        os.makedirs(extref_logo_dir)
    if config.extref_logo_images:
        extref_logo_images = {}
        for logo_name, logo_src_path in config.extref_logo_images.items():
            logo_src_fullpath = os.path.join(app.srcdir, logo_src_path)
            logo_doc_fullpath = os.path.join(extref_logo_dir, "{0}{1}".format(logo_name, os.path.splitext(logo_src_path)[1]))
            extref_logo_images[logo_name] = logo_doc_fullpath
            if not os.path.isfile(logo_doc_fullpath):
                shutil.copy(logo_src_fullpath, logo_doc_fullpath)
        config.extref_logo_images = extref_logo_images