def copy_svg_icon(connector_name, connector_docs_dir):
    """Copy SVG icon to connector documentation directory."""
    # Look for the icon in the apps directory
    icon_path = None
    for icon_candidate in [f"{connector_name}.svg", f"{connector_name}-light.svg"]:
        source_path = FRONTEND_ICONS_DIR / icon_candidate
        if source_path.exists():
            icon_path = source_path
            break

    if not icon_path:
        print(f"  Warning: No SVG icon found for {connector_name}")
        return False

    # Copy icon to the connector directory
    dest_path = connector_docs_dir / "icon.svg"
    shutil.copy2(icon_path, dest_path)
    print(f"  Copied {icon_path.name} to {dest_path.relative_to(Path.cwd())}")
    return True
Copy SVG icon to connector documentation directory.
fern/scripts/update_connector_docs/utils/file_utils.py