22-08-2024

This commit is contained in:
2024-08-22 08:44:15 +02:00
parent 4675acdd0d
commit aaf3776e62
20 changed files with 782 additions and 4 deletions

68
exiftool.sh Executable file
View File

@@ -0,0 +1,68 @@
#! /bin/bash
function usage {
echo "usage: $0 -ms path_of_file"
echo " -m to remove useless exif entries"
echo " -s to show current exif entries"
exit -1
}
if [ $# != 2 ]; then
usage
fi
OP=$1
SRC=$2
if [ ! -f $SRC ]; then
echo "error: file not found"
exit -2
fi
if [ $OP = "-m" ]; then
cp "$SRC" "$SRC"."_tmp"
exiftool -all= "$SRC"
exiftool -overwrite_original
-TagsFromFile "$SRC"."_tmp"
-ExposureTime
-FNumber
-ExposureProgram
-ISO
-DateTimeOriginal
-CreateDate
-ExposureCompensation
-MaxApertureValue
-MeteringMode
-LightSource
-Flash
-FocalLength
-SubSecTime
-SubSecTimeOriginal
-SubSecTimeDigitized
-ColorSpace
-ExifImageWidth
-ExifImageHeight
-SensingMethod
-CustomRendered
-ExposureMode
-WhiteBalance
-DigitalZoomRatio
-FocalLengthIn35mmFormat
-SceneCaptureType
-GainControl
-Contrast
-Saturation
-Sharpness
-SubjectDistanceRange
-GPSVersionID
-GPSLatitudeRef
-GPSLatitude
-GPSLongitudeRef
-GPSLongitude
-Make
-Model
"$SRC"
exiftool -delete_original! "$SRC"
rm -f "$SRC"."_tmp"
else
if [ $OP = "-s" ]; then
exiftool "$SRC"
else
usage
fi
fi