Initial commit
This commit is contained in:
commit
92e96b9107
85 changed files with 24969 additions and 0 deletions
39
scripts/audit-images.sh
Executable file
39
scripts/audit-images.sh
Executable file
|
|
@ -0,0 +1,39 @@
|
|||
#!/bin/bash
|
||||
# Audit script to identify missing image references
|
||||
|
||||
echo "=== Image Reference Audit ==="
|
||||
echo ""
|
||||
echo "Finding all image references in articles..."
|
||||
echo ""
|
||||
|
||||
REFS=$(grep -rh '!\[' content/articles/ 2>/dev/null | grep -oE '\(/img/[^)]+\)' | sed 's/(//' | sed 's/)//' | sort -u)
|
||||
|
||||
echo "Total image references found: $(echo "$REFS" | wc -l)"
|
||||
echo ""
|
||||
echo "Checking which exist in /public/img/:"
|
||||
echo ""
|
||||
|
||||
MISSING_COUNT=0
|
||||
EXISTING_COUNT=0
|
||||
|
||||
while read -r ref; do
|
||||
if [ -z "$ref" ]; then continue; fi
|
||||
|
||||
filename=$(basename "$ref")
|
||||
fullpath="/Users/jennie/Sites/wiki-ghostguild${ref}"
|
||||
|
||||
if [ -f "$fullpath" ]; then
|
||||
echo "✓ $filename"
|
||||
((EXISTING_COUNT++))
|
||||
else
|
||||
echo "✗ MISSING: $filename"
|
||||
((MISSING_COUNT++))
|
||||
fi
|
||||
done <<< "$REFS"
|
||||
|
||||
echo ""
|
||||
echo "=== Summary ==="
|
||||
echo "Existing images: $EXISTING_COUNT"
|
||||
echo "Missing images: $MISSING_COUNT"
|
||||
echo ""
|
||||
echo "Missing images need to be added to /public/img/ or updated in article markdown."
|
||||
Loading…
Add table
Add a link
Reference in a new issue