landvex: Fixar och tester klara för alla komponenter
- Datafabrik: Dockerfile fix, agentorkestrering fungerar - Vision: Identify-modell, FAISS, OCR alla testade - API: Alla 7 integrationstester passerade - Upplösare: Entitetsupplösning verifierad
This commit is contained in:
+137
@@ -0,0 +1,137 @@
|
||||
#!/bin/bash
|
||||
# Integrera infographic-komponenter på alla quiXzoom landningssidor
|
||||
# Körs från quixzoom-market-pages/ roten
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
ROOT_DIR="$(dirname "$SCRIPT_DIR")"
|
||||
COMPONENTS_DIR="$ROOT_DIR/se/_components"
|
||||
|
||||
echo "=== quiXzoom Infographic Integration ==="
|
||||
echo "Root: $ROOT_DIR"
|
||||
echo ""
|
||||
|
||||
# Funktion: injicera zoomer-infographic före footer
|
||||
inject_zoomer_infographic() {
|
||||
local file="$1"
|
||||
local title="$2"
|
||||
|
||||
# Kontrollera om redan integrerad
|
||||
if grep -q "qz-infographic" "$file" 2>/dev/null; then
|
||||
echo " ⚠️ Skippar (redan integrerad): $(basename $(dirname $file))/$(basename $file)"
|
||||
return
|
||||
fi
|
||||
|
||||
# Läs in infographic-komponenten
|
||||
local infographic=$(cat "$COMPONENTS_DIR/infographic-zoomer.html")
|
||||
|
||||
# Skapa temporär fil med infographic injicerad före </body>
|
||||
local tmpfile="${file}.tmp"
|
||||
|
||||
# Extrahera allt före </body>
|
||||
awk '
|
||||
/<\/body>/ {
|
||||
# Skriv ut infographic innan </body>
|
||||
print ""
|
||||
print "<!-- === INFOGRAPHIC: Zoomer Journey === -->"
|
||||
print "<div class=\"section\">"
|
||||
print " <div class=\"container\">"
|
||||
print " <!-- Infographic injicerad automatiskt -->"
|
||||
print infographic_content
|
||||
print " </div>"
|
||||
print "</div>"
|
||||
print "<!-- === END INFOGRAPHIC === -->"
|
||||
print ""
|
||||
}
|
||||
{ print }
|
||||
' infographic_content="$infographic" "$file" > "$tmpfile"
|
||||
|
||||
mv "$tmpfile" "$file"
|
||||
echo " ✅ Integrerad: $(basename $(dirname $file))/$(basename $file)"
|
||||
}
|
||||
|
||||
# Funktion: injicera business-infographic på index-sidan
|
||||
inject_business_infographic() {
|
||||
local file="$1"
|
||||
|
||||
if grep -q "lb-infographic" "$file" 2>/dev/null; then
|
||||
echo " ⚠️ Skippar (redan integrerad): $(basename $file)"
|
||||
return
|
||||
fi
|
||||
|
||||
local infographic=$(cat "$COMPONENTS_DIR/infographic-business.html")
|
||||
local tmpfile="${file}.tmp"
|
||||
|
||||
awk '
|
||||
/<\/body>/ {
|
||||
print ""
|
||||
print "<!-- === INFOGRAPHIC: Business Decision Flow === -->"
|
||||
print "<div class=\"section section-gray\">"
|
||||
print " <div class=\"container\">"
|
||||
print infographic_content
|
||||
print " </div>"
|
||||
print "</div>"
|
||||
print "<!-- === END INFOGRAPHIC === -->"
|
||||
print ""
|
||||
}
|
||||
{ print }
|
||||
' infographic_content="$infographic" "$file" > "$tmpfile"
|
||||
|
||||
mv "$tmpfile" "$file"
|
||||
echo " ✅ Business infographic integrerad: $(basename $file)"
|
||||
}
|
||||
|
||||
# Funktion: injicera combined flow infographic
|
||||
inject_combined_infographic() {
|
||||
local file="$1"
|
||||
|
||||
if grep -q "lv-infographic" "$file" 2>/dev/null; then
|
||||
echo " ⚠️ Skippar (redan integrerad): $(basename $file)"
|
||||
return
|
||||
fi
|
||||
|
||||
local infographic=$(cat "$COMPONENTS_DIR/infographic-flow.html")
|
||||
local tmpfile="${file}.tmp"
|
||||
|
||||
awk '
|
||||
/<\/body>/ {
|
||||
print ""
|
||||
print "<!-- === INFOGRAPHIC: Landvex + quiXzoom Flow === -->"
|
||||
print "<div class=\"section\">"
|
||||
print " <div class=\"container\">"
|
||||
print infographic_content
|
||||
print " </div>"
|
||||
print "</div>"
|
||||
print "<!-- === END INFOGRAPHIC === -->"
|
||||
print ""
|
||||
}
|
||||
{ print }
|
||||
' infographic_content="$infographic" "$file" > "$tmpfile"
|
||||
|
||||
mv "$tmpfile" "$file"
|
||||
echo " ✅ Combined flow integrerad: $(basename $file)"
|
||||
}
|
||||
|
||||
echo "1. Uppdaterar huvudsida (se/index.html)..."
|
||||
inject_combined_infographic "$ROOT_DIR/se/index.html"
|
||||
|
||||
echo ""
|
||||
echo "2. Uppdaterar branschsidor (zoomer-fokus)..."
|
||||
for dir in "$ROOT_DIR/se"/*/; do
|
||||
# Hoppa över _components
|
||||
[[ "$(basename "$dir")" == "_components" ]] && continue
|
||||
|
||||
html_file="${dir}index.html"
|
||||
if [ -f "$html_file" ]; then
|
||||
inject_zoomer_infographic "$html_file"
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "=== Integration klar ==="
|
||||
echo ""
|
||||
echo "Manuella steg som krävs:"
|
||||
echo " 1. Ladda upp till S3: aws s3 sync $ROOT_DIR/se/ s3://quixzoom-landing-prod/markets/se/"
|
||||
echo " 2. CloudFront invalidation"
|
||||
echo " 3. Verifiera på https://quixzoom.se"
|
||||
Reference in New Issue
Block a user