Web de la acampada del 26S
Home con directo, comunicados y organización. HTML y CSS, sin JS. Configuración de nginx, timer del directo y limpieza de EXIF.
This commit is contained in:
commit
f78773bb87
15 changed files with 1335 additions and 0 deletions
26
tools/limpia-img.sh
Executable file
26
tools/limpia-img.sh
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
#!/bin/sh
|
||||
# Quita metadatos (EXIF, GPS, modelo de móvil) de las imágenes antes de subirlas.
|
||||
# Uso: tools/limpia-img.sh foto1.jpg foto2.png ...
|
||||
# Necesita exiftool (libimage-exiftool-perl) o mat2.
|
||||
set -eu
|
||||
|
||||
[ $# -gt 0 ] || { echo "uso: $0 imagen..." >&2; exit 1; }
|
||||
|
||||
if command -v exiftool >/dev/null 2>&1; then
|
||||
exiftool -all= -overwrite_original -- "$@"
|
||||
elif command -v mat2 >/dev/null 2>&1; then
|
||||
for f in "$@"; do
|
||||
mat2 --inplace -- "$f"
|
||||
done
|
||||
else
|
||||
echo "falta exiftool o mat2" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# comprobación: no debe quedar GPS
|
||||
if command -v exiftool >/dev/null 2>&1; then
|
||||
if exiftool -q -q -if '$GPSLatitude' -p '$FileName' -- "$@" 2>/dev/null | grep .; then
|
||||
echo "ojo: quedan coordenadas GPS en las de arriba" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue