File size: 2,224 Bytes
1ee6ce7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/bin/bash

# Script to monitor and automatically continue the pipeline

echo "πŸ” Pipeline monitoring in progress..."

# Wait for step 1 to complete (check for presence of 300 fonts)
echo "⏳ Waiting for fonts download to complete..."

while true; do
    if [ -d "generated/fonts" ]; then
        font_count=$(ls generated/fonts/*.ttf 2>/dev/null | wc -l)
        echo "πŸ“ˆ Fonts downloaded: $font_count/300"

        if [ "$font_count" -ge 295 ]; then  # We accept 295+ in case some fail
            echo "βœ… Download completed! Launching next steps..."
            break
        fi
    else
        echo "πŸ“ generated/fonts directory not yet created..."
    fi

    sleep 5
done

# Step 2: Generate SVGs
echo ""
echo "🎨 Step 2: SVG Generation..."
node 2-generate-svgs.mjs

if [ $? -eq 0 ]; then
    echo "βœ… Step 2 completed successfully"
else
    echo "❌ Step 2 Error"
    exit 1
fi

# Step 3: Generate PNGs
echo ""
echo "πŸ–ΌοΈ  Step 3: Converting to PNGs..."
node 3-generate-pngs.mjs

if [ $? -eq 0 ]; then
    echo "βœ… Step 3 completed successfully"
else
    echo "❌ Step 3 Error"
    exit 1
fi

# Step 4: Generate UMAP
echo ""
echo "πŸ—ΊοΈ  Step 4: UMAP Generation..."
poetry run python 4-generate-umap.py

if [ $? -eq 0 ]; then
    echo "βœ… Step 4 completed successfully"
else
    echo "❌ Step 4 Error"
    exit 1
fi

# Step 5: Generate Sprite
echo ""
echo "🎯 Step 5: Sprite Generation..."
node 5-generate-sprite.mjs

if [ $? -eq 0 ]; then
    echo "βœ… Step 5 completed successfully"
    echo ""
    echo "πŸŽ‰ Complete pipeline finished successfully!"

    # Display final statistics
    echo ""
    echo "πŸ“Š Final Results:"
    echo "πŸ“ Fonts TTF: $(ls generated/fonts/*.ttf 2>/dev/null | wc -l)"
    echo "🎨 SVGs: $(ls generated/svgs/*.svg 2>/dev/null | wc -l)"
    echo "πŸ–ΌοΈ  PNGs: $(ls generated/pngs/*.png 2>/dev/null | wc -l)"
    echo "πŸ“„ Data files:"
    ls -la generated/data/ 2>/dev/null

    # Check manifest
    if [ -f "generated/data/font_manifest.json" ]; then
        manifest_count=$(jq 'keys | length' generated/data/font_manifest.json 2>/dev/null)
        echo "πŸ“ Fonts in manifest: $manifest_count"
    fi

else
    echo "❌ Step 5 Error"
    exit 1
fi