#!/bin/bash # MCPTesta Logo Export Generation Script # Generates comprehensive logo asset collection from master SVG files set -e # Exit on any error echo "๐Ÿงช MCPTesta Logo Export Generation" echo "==================================" # Color definitions for output RED='\033[0;31m' GREEN='\033[0;32m' YELLOW='\033[1;33m' BLUE='\033[0;34m' PURPLE='\033[0;35m' NC='\033[0m' # No Color # Check dependencies command -v magick >/dev/null 2>&1 || { echo -e "${RED}Error: ImageMagick is required but not installed.${NC}" >&2 echo "Install with: brew install imagemagick (macOS) or apt-get install imagemagick (Ubuntu)" exit 1 } command -v xmllint >/dev/null 2>&1 || { echo -e "${YELLOW}Warning: xmllint not found. SVG validation will be skipped.${NC}" >&2 } # Project directories PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" LOGO_DIR="$PROJECT_ROOT/assets/logo" SOURCE_DIR="$LOGO_DIR/source" cd "$PROJECT_ROOT" # Verify master SVG exists MASTER_SVG="$SOURCE_DIR/mcptesta-logo-master.svg" if [ ! -f "$MASTER_SVG" ]; then echo -e "${RED}Error: Master SVG not found at $MASTER_SVG${NC}" echo "Please create the master SVG file first using the specifications in:" echo " - logo-design-specs.md" echo " - logo-export-specifications.md" exit 1 fi echo -e "${GREEN}โœ“ Master SVG found${NC}" # Validate SVG if xmllint is available if command -v xmllint >/dev/null 2>&1; then if xmllint --noout "$MASTER_SVG" 2>/dev/null; then echo -e "${GREEN}โœ“ Master SVG is valid${NC}" else echo -e "${RED}Error: Master SVG is not valid XML${NC}" exit 1 fi fi echo "" echo -e "${BLUE}๐Ÿ“ฑ Generating Favicon Package...${NC}" # Generate favicon sizes cd "$LOGO_DIR/favicons" magick "$MASTER_SVG" -resize 16x16 -strip favicon-16x16.png magick "$MASTER_SVG" -resize 32x32 -strip favicon-32x32.png magick "$MASTER_SVG" -resize 48x48 -strip favicon-48x48.png # Create multi-resolution ICO magick favicon-16x16.png favicon-32x32.png favicon-48x48.png favicon.ico # Copy SVG favicon for modern browsers cp "$MASTER_SVG" favicon.svg # Apple touch icon magick "$MASTER_SVG" -resize 180x180 -strip apple-touch-icon.png # Android chrome icon magick "$MASTER_SVG" -resize 192x192 -strip android-chrome-192x192.png echo -e "${GREEN}โœ“ Favicon package complete${NC}" echo "" echo -e "${BLUE}๐Ÿ“ฑ Generating iOS App Icons...${NC}" # iOS App Store sizes cd "$LOGO_DIR/app-icons/ios" declare -a ios_sizes=("57" "114" "120" "180" "1024") for size in "${ios_sizes[@]}"; do magick "$MASTER_SVG" -resize ${size}x${size} -strip icon-${size}x${size}.png echo " Generated iOS ${size}x${size}" done echo -e "${GREEN}โœ“ iOS icons complete${NC}" echo "" echo -e "${BLUE}๐Ÿค– Generating Android App Icons...${NC}" # Android Play Store sizes cd "$LOGO_DIR/app-icons/android" declare -a android_sizes=("72" "96" "144" "192" "512") for size in "${android_sizes[@]}"; do magick "$MASTER_SVG" -resize ${size}x${size} -strip icon-${size}x${size}.png echo " Generated Android ${size}x${size}" done echo -e "${GREEN}โœ“ Android icons complete${NC}" echo "" echo -e "${BLUE}๐ŸŒ Generating Web Assets...${NC}" # Web-optimized sizes cd "$LOGO_DIR/web" declare -a web_sizes=("64" "128" "256" "512") for size in "${web_sizes[@]}"; do magick "$MASTER_SVG" -resize ${size}x${size} -strip mcptesta-logo-${size}px.png echo " Generated web ${size}px" done # Copy optimized SVG for web cp "$MASTER_SVG" mcptesta-logo.svg echo -e "${GREEN}โœ“ Web assets complete${NC}" echo "" echo -e "${BLUE}๐Ÿ“ฑ Generating Social Media Assets...${NC}" cd "$LOGO_DIR/social" # Profile picture (square) magick "$MASTER_SVG" -resize 400x400 -strip profile-400x400.png # Social media card (with background and text) magick -size 1200x630 xc:"#6B46C1" \ \( "$MASTER_SVG" -resize 300x300 \) \ -gravity west -geometry +150+0 -composite \ -font Arial-Bold -pointsize 64 -fill white \ -gravity center -annotate +200+0 "MCPTesta" \ -font Arial -pointsize 32 -fill "#E2E8F0" \ -gravity center -annotate +200+80 "Community-driven testing excellence" \ card-1200x630.png # GitHub social preview magick -size 1280x640 xc:"#0D1117" \ \( "$MASTER_SVG" -resize 240x240 \) \ -gravity west -geometry +120+0 -composite \ -font Arial-Bold -pointsize 54 -fill white \ -gravity center -annotate +250+0 "MCPTesta" \ -font Arial -pointsize 28 -fill "#8B949E" \ -gravity center -annotate +250+60 "FastMCP Testing Framework" \ github-social-1280x640.png # Twitter header magick -size 1500x500 gradient:"#6B46C1-#8B5CF6" \ \( "$MASTER_SVG" -resize 200x200 \) \ -gravity west -geometry +100+0 -composite \ -font Arial-Bold -pointsize 48 -fill white \ -gravity center -annotate +200+0 "MCPTesta" \ -font Arial -pointsize 24 -fill "#E2E8F0" \ -gravity center -annotate +200+50 "Community-driven testing excellence for MCP" \ header-1500x500.png echo -e "${GREEN}โœ“ Social media assets complete${NC}" echo "" echo -e "${BLUE}๐ŸŽจ Generating Theme Variants...${NC}" # Note: Theme variants would require separate SVG files with different colors # This is a placeholder for manual theme variant creation cd "$LOGO_DIR/theme-variants" echo " Dark theme variants: Pending manual creation" echo " Light theme variants: Pending manual creation" echo " High contrast variants: Pending manual creation" echo -e "${YELLOW}โš  Theme variants require manual SVG creation with adjusted colors${NC}" echo "" echo -e "${BLUE}๐Ÿ“Š Generating Asset Summary...${NC}" # Count generated files total_files=0 for dir in favicons app-icons/ios app-icons/android web social; do count=$(find "$LOGO_DIR/$dir" -name "*.png" -o -name "*.ico" -o -name "*.svg" | wc -l) total_files=$((total_files + count)) echo " $dir: $count files" done echo "" echo -e "${GREEN}๐ŸŽ‰ Logo Export Generation Complete!${NC}" echo -e "${PURPLE}Generated $total_files asset files${NC}" echo "" echo -e "${BLUE}๐Ÿ“‹ Next Steps:${NC}" echo "1. Review generated assets in assets/logo/" echo "2. Create theme variant SVG files manually" echo "3. Run quality assurance: ./scripts/qa-logo-check.sh" echo "4. Integrate into documentation and project files" echo "" echo -e "${BLUE}๐Ÿ”ง Manual Tasks Remaining:${NC}" echo "โ€ข Create horizontal layout SVG (logo + text)" echo "โ€ข Design dark theme color variants" echo "โ€ข Design light theme color variants" echo "โ€ข Create high-contrast accessibility versions" echo "โ€ข Generate print-ready CMYK files" echo "" echo -e "${GREEN}Asset generation script completed successfully!${NC} ๐Ÿงช"