Commit 3a714efa authored by Dmitri Popov's avatar Dmitri Popov

Fix geotagging, add getops

parent 2eca18b5
......@@ -4,11 +4,11 @@
# License: GPLv3 https://www.gnu.org/licenses/gpl-3.0.txt
# Source code: https://gitlab.com/dmpop/momo
# opkg install bc jq curl rsync perl-image-exiftool
# opkg install getops bc jq curl perl-image-exiftool
# Check whether the required packages are installed
if [ ! -x "$(command -v bc)" ] || [ ! -x "$(command -v jq)" ] || [ ! -x "$(command -v curl)" ] || [ ! -x "$(command -v exiftool)" ]; then
echo "Make sure that the following tools are installed on your system: bc, jq, curl, exiftool"
if [ ! -x "$(command -v getops)" ] || [ ! -x "$(command -v bc)" ] || [ ! -x "$(command -v jq)" ] || [ ! -x "$(command -v curl)" ] || [ ! -x "$(command -v exiftool)" ]; then
echo "Make sure that the following tools are installed on your system: getops, bc, jq, curl, exiftool"
exit 1
fi
......@@ -124,6 +124,8 @@ if [ ! -z "$location" ]; then
fi
fi
if [ -z "$location" ]; then
echo
echo "--------------"
echo "Geotagging ..."
......@@ -135,7 +137,8 @@ fi
do
file=$(echo -e "$results" | sed -n "$line p")
exiftool -overwrite_original -GPSLatitude=$lat -GPSLatitudeRef=$latref -GPSLongitude=$lon -GPSLongitudeRef=$lonref "$file"
done
done
fi
# Check whether the Dark Sky API is reachable
check2=$(wget -q --spider https://api.darksky.net/)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment