#!/bin/bash # Generate standardized city inspection landing pages - v2 set -e # Cities per country (slug|name) SWEDEN_CITIES="stockholm|Stockholm goteborg|Göteborg malmo|Malmö uppsala|Uppsala linkoping|Linköping orebro|Örebro" GERMANY_CITIES="berlin|Berlin hamburg|Hamburg munich|München cologne|Köln frankfurt|Frankfurt stuttgart|Stuttgart" FRANCE_CITIES="paris|Paris marseille|Marseille lyon|Lyon toulouse|Toulouse nice|Nice nantes|Nantes" UK_CITIES="london|London manchester|Manchester birmingham|Birmingham glasgow|Glasgow liverpool|Liverpool leeds|Leeds" NETHERLANDS_CITIES="amsterdam|Amsterdam rotterdam|Rotterdam the-hague|Den_Haag utrecht|Utrecht eindhoven|Eindhoven tilburg|Tilburg" # Services (slug|name|description) SERVICES=( "bridge-inspection|Bridge Inspection|Professional bridge inspection services in {city}. {compliance} compliant." "facade-inspection|Facade Inspection|Building facade inspection and documentation in {city}. Identify maintenance needs." "road-condition|Road Condition|AI-assisted road surface analysis and condition mapping across {city}." "street-lighting|Street Lighting|Verify street light functionality and coverage across {city}." "construction-monitoring|Construction Monitoring|Document construction progress and verify compliance in {city}." "property-verification|Property Verification|Verify property condition and occupancy in {city}." "retail-audit|Retail Audit|Document storefront conditions and competitor presence in {city}." "accessibility-audit|Accessibility Audit|Verify accessibility compliance for public spaces in {city}." "environmental-monitoring|Environmental Monitoring|Track environmental conditions and green space status in {city}." "storm-damage|Storm Damage|Rapid post-storm documentation of damage across {city}." ) # Flags get_flag() { case "$1" in sweden) echo "🇸🇪" ;; germany) echo "🇩🇪" ;; france) echo "🇫🇷" ;; uk) echo "🇬🇧" ;; netherlands) echo "🇳🇱" ;; esac } # Compliance get_compliance() { case "$1" in sweden) echo "Trafikverket" ;; germany) echo "DIN" ;; france) echo "CEREMA" ;; uk) echo "DfT" ;; netherlands) echo "Rijkswaterstaat" ;; esac } # Generate page generate_page() { local service_slug="$1" local service_name="$2" local service_desc="$3" local city_slug="$4" local city_name="$5" local country="$6" local flag="$7" local compliance="$8" # Build related services local related="" for svc in "${SERVICES[@]}"; do local s_slug=$(echo "$svc" | cut -d'|' -f1) local s_name=$(echo "$svc" | cut -d'|' -f2) if [[ "$s_slug" != "$service_slug" ]]; then related+=" \n" related+="
🏙️
\n" related+="

$s_name — $city_name

\n" related+="

Available in $city_name.

\n" related+="
Explore →
\n" related+="
\n" fi done # Add country-level link related+=" \n" related+="
$flag
\n" related+="

$service_name — $(echo "$country" | sed 's/.*/\u&/')

\n" related+="

Nationwide coverage.

\n" related+="
Explore →
\n" related+="
\n" # Add enterprise related+=" \n" related+="
🏢
\n" related+="

Enterprise Solutions

\n" related+="

Custom programs with API and SLA.

\n" related+="
Learn more →
\n" related+="
\n" # Build description local desc=$(echo "$service_desc" | sed "s/{city}/$city_name/g; s/{compliance}/$compliance/g") cat << EOF $service_name in $city_name — quiXzoom
$flag $city_name · $compliance Compliant

$service_name in $city_name

$desc

Why choose quiXzoom in $city_name

Local expertise, global standards

Local Coverage

Zoomers available throughout $city_name. Fast response times, local knowledge.

$compliance Compliant

All inspections follow $compliance regulations. Digital reports ready.

Rapid Deployment

Missions deployed within hours. Same-day for urgent requests.

Verified Data

AI quality control with geolocation and timestamps. Court-admissible.

Cost Effective

Up to 70% cheaper than traditional. Pay per mission.

Scalable

From single to city-wide campaigns. Handle any volume.

Related services in $city_name

Complete inspection solutions

Start inspecting in $city_name today

Get a custom quote. No minimum commitment.

View pricingContact sales
EOF } # Generate all pages count=0 for country in sweden germany france uk netherlands; do flag=$(get_flag "$country") compliance=$(get_compliance "$country") # Get cities for this country cities_var="${country^^}_CITIES" cities="${!cities_var}" for city_info in $cities; do city_slug=$(echo "$city_info" | cut -d'|' -f1) city_name=$(echo "$city_info" | cut -d'|' -f2 | tr '_' ' ') for service in "${SERVICES[@]}"; do svc_slug=$(echo "$service" | cut -d'|' -f1) svc_name=$(echo "$service" | cut -d'|' -f2) svc_desc=$(echo "$service" | cut -d'|' -f3) echo "Generating: $svc_slug/$city_slug ($city_name, $country)..." page=$(generate_page "$svc_slug" "$svc_name" "$svc_desc" "$city_slug" "$city_name" "$country" "$flag" "$compliance") echo "$page" | aws s3 cp - "s3://quixzoom-landing-prod/$svc_slug/$city_slug.html" --content-type "text/html" --cache-control "max-age=3600" ((count++)) done done done echo "" echo "✅ Generated $count city-specific landing pages" aws cloudfront create-invalidation --distribution-id EE30B9WM5ZYM7 --paths "/*" --query 'Invalidation.Id' --output text