Added Logos

This commit is contained in:
Eric Gullickson
2025-12-15 21:13:23 -06:00
parent 8a28749b3c
commit e1c48b7a26
54 changed files with 130 additions and 1 deletions

129
scripts/download-make-logos.sh Executable file
View File

@@ -0,0 +1,129 @@
#!/bin/bash
# Download automotive make logos from vehapi.com
# Usage: ./scripts/download-make-logos.sh
set -e
# Output directory
OUTPUT_DIR="frontend/public/images/makes"
mkdir -p "$OUTPUT_DIR"
# Base URL
BASE_URL="https://vehapi.com/img/car-logos"
# List of common automotive makes
# Format: "output_filename:url_name" (if same, just use the name)
# vehapi uses underscores for multi-word makes: alfa_romeo, aston_martin, etc.
MAKES=(
"acura"
"alfa-romeo:alfa_romeo"
"aston-martin:aston_martin"
"audi"
"bentley"
"bmw"
"buick"
"cadillac"
"chevrolet"
"chrysler"
"dodge"
"ferrari"
"fiat"
"ford"
"genesis"
"gmc"
"honda"
"hummer"
"hyundai"
"infiniti"
"isuzu"
"jaguar"
"jeep"
"kia"
"lamborghini"
"land-rover:land_rover"
"lexus"
"lincoln"
"lotus"
"maserati"
"mazda"
"mercedes-benz:mercedes_benz"
"mercury"
"mini"
"mitsubishi"
"nissan"
"oldsmobile"
"plymouth"
"polestar"
"pontiac"
"porsche"
"ram"
"rivian"
"rolls-royce:rolls_royce"
"saab"
"scion"
"smart"
"subaru"
"tesla"
"toyota"
"volkswagen"
"volvo"
)
echo "Downloading make logos to $OUTPUT_DIR..."
echo ""
SUCCESS_COUNT=0
FAIL_COUNT=0
FAILED_MAKES=()
for entry in "${MAKES[@]}"; do
# Parse entry - format is "output_name:url_name" or just "name"
if [[ "$entry" == *":"* ]]; then
OUTPUT_NAME="${entry%%:*}"
URL_NAME="${entry##*:}"
else
OUTPUT_NAME="$entry"
URL_NAME="$entry"
fi
OUTPUT_FILE="$OUTPUT_DIR/$OUTPUT_NAME.png"
URL="$BASE_URL/$URL_NAME.png"
echo -n "Downloading $OUTPUT_NAME... "
# Use curl with -f to fail on HTTP errors, -s for silent, -o for output
if curl -fsSL "$URL" -o "$OUTPUT_FILE" 2>/dev/null; then
# Verify it's actually an image (check for PNG magic bytes)
if file "$OUTPUT_FILE" | grep -q "PNG image"; then
echo "OK"
((SUCCESS_COUNT++))
else
echo "FAILED (not a valid PNG)"
rm -f "$OUTPUT_FILE"
((FAIL_COUNT++))
FAILED_MAKES+=("$OUTPUT_NAME")
fi
else
echo "FAILED (HTTP error)"
rm -f "$OUTPUT_FILE"
((FAIL_COUNT++))
FAILED_MAKES+=("$OUTPUT_NAME")
fi
done
echo ""
echo "================================"
echo "Download complete!"
echo "Success: $SUCCESS_COUNT"
echo "Failed: $FAIL_COUNT"
if [ ${#FAILED_MAKES[@]} -gt 0 ]; then
echo ""
echo "Failed makes:"
for make in "${FAILED_MAKES[@]}"; do
echo " - $make"
done
fi
echo ""
echo "Logos saved to: $OUTPUT_DIR"