Files
harheimertc/scripts/anonymize-playstore-screenshot.sh
Torsten Schulz (local) 5c3d78245f
Some checks failed
Code Analysis and Production Deploy / analyze (push) Failing after 2m10s
Code Analysis and Production Deploy / deploy-production (push) Has been skipped
Code Analysis and Production Deploy / deploy-test (push) Has been skipped
feat: add Datenschutzerklärung and Konto löschen pages
- Created datenschutz.vue for the privacy policy with sections on data protection, responsible entity, data processing, rights, and contact information.
- Created konto-loeschen.vue for account deletion requests, detailing the process, affected data, and processing time.
- Added anonymize-playstore-screenshot.sh script for image anonymization using ImageMagick.
- Introduced playstore-assets.mjs for generating Play Store assets, including icons and feature graphics, using sharp.
- Added playstore-assets.sh script to execute the asset generation script.
2026-05-29 16:51:36 +02:00

33 lines
771 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
if [[ $# -lt 3 ]]; then
echo "Nutzung: $0 <input.png> <output.png> <rects>"
echo "rects Format: x,y,w,h;x,y,w,h"
echo "Beispiel: $0 shot.png shot-anon.png '80,120,420,70;72,720,540,90'"
exit 1
fi
INPUT="$1"
OUTPUT="$2"
RECTS="$3"
if ! command -v magick >/dev/null 2>&1; then
echo "Fehler: 'magick' (ImageMagick) ist nicht installiert."
exit 1
fi
TMP="$OUTPUT.tmp.png"
cp "$INPUT" "$TMP"
IFS=';' read -r -a BOXES <<< "$RECTS"
for box in "${BOXES[@]}"; do
IFS=',' read -r x y w h <<< "$box"
magick "$TMP" \
\( -size "${w}x${h}" xc:black -alpha set -channel a -evaluate set 70% +channel \) \
-geometry "+${x}+${y}" -composite "$TMP"
done
mv "$TMP" "$OUTPUT"
echo "Anonymisierte Datei geschrieben: $OUTPUT"