Initial: Projektstruktur, Referenz-Dokument, Implementierungsplan, Test-Skripte

This commit is contained in:
Hermes Agent
2026-07-02 15:29:19 +00:00
commit 5a7db008ee
5 changed files with 710 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
#!/bin/bash
# Generiert PNG-Testbilder mit exakten Dimensionen auf orange-desktop
# Aufruf: bash generate-test-images.sh
HOST="${1:-orange@niklashmotion.art}"
ssh "$HOST" "python3 -c \"
import struct, zlib
def create_png(w, h):
def chunk(ctype, data):
c = ctype + data
crc = struct.pack('>I', zlib.crc32(c) & 0xffffffff)
return struct.pack('>I', len(data)) + c + crc
sig = b'\\\x89PNG\\r\\n\\x1a\\n'
ihdr = chunk(b'IHDR', struct.pack('>IIBBBBB', w, h, 8, 2, 0, 0, 0))
raw = b''
for y in range(h):
raw += b'\\x00' + bytes([(x+y) % 256 for x in range(w*3)])
idat = chunk(b'IDAT', zlib.compress(raw))
iend = chunk(b'IEND', b'')
return sig + ihdr + idat + iend
sizes = [(500, 400, 'small'), (2000, 1500, 'medium'), (5000, 3750, 'large'), (8000, 6000, 'xl')]
for w, h, label in sizes:
with open(f'/tmp/test-{label}-{w}x{h}.png', 'wb') as f:
f.write(create_png(w, h))
print(f'Created test-{label}-{w}x{h}.png')
\""
echo "Done. Test images on $HOST:/tmp/test-*.png"
+32
View File
@@ -0,0 +1,32 @@
#!/bin/bash
# Verifiziert Phase 1: CORS + WebDAV-Zugriff
# Aufruf: bash verify-phase1.sh
set -e
source ~/.hermes/nextcloud.env 2>/dev/null || source /opt/data/home/.hermes/nextcloud.env
echo "=== Phase 1 Verification ==="
echo ""
# Check 1: Ordner existiert
echo "1. WhiteboardAssets folder..."
CODE=$(curl -s -o /dev/null -w "%{http_code}" -u "$NEXTCLOUD_USER:$NEXTCLOUD_TOKEN" \
-X PROPFIND "$NEXTCLOUD_URL/remote.php/dav/files/$NEXTCLOUD_USER/WhiteboardAssets/")
if [ "$CODE" = "207" ]; then echo " ✅ Folder exists (HTTP $CODE)"; else echo " ❌ HTTP $CODE"; fi
# Check 2: CORS-Header
echo "2. CORS headers..."
CORS=$(curl -sI "https://nextcloud.niklashmotion.art/remote.php/dav/files/Hermes/WhiteboardAssets/test.png" 2>/dev/null | grep -i "access-control-allow-origin" || echo "")
if [ -n "$CORS" ]; then echo "$CORS"; else echo " ❌ No CORS header"; fi
# Check 3: Upload
echo "3. Upload test..."
ssh orange@niklashmotion.art "test -f /tmp/test-small-500x400.png && echo 'exists' || echo 'missing'" 2>/dev/null
echo " (run generate-test-images.sh first if missing)"
# Check 4: All 6 existing patches still active
echo "4. Existing patches..."
ssh orange@niklashmotion.art "bash /opt/data/skills/devops/whiteboard-patches/scripts/verify-whiteboard-patches.sh" 2>/dev/null
echo ""
echo "=== Done ==="