Last active
December 18, 2023 10:34
-
-
Save pas-calc/0e6063affa749fedc2e51cea88345929 to your computer and use it in GitHub Desktop.
GEO Exif Coordinate viewer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Pascal K. | |
# Mi 25 Nov 2020 23:36:54 CET | |
# Do 26 Nov 2020 13:43:43 CET | |
# Mo 18 Dez 2023 11:32:34 CET - use "xdg-open" to open link in browser | |
echo "GEO Exif Coordinate viewer" | |
echo "--------------------------" | |
echo "Filename = $1" | |
if [ -f "$1" ]; then | |
file "$1" | |
else | |
echo "File does not exist." | |
exit 1 | |
fi | |
coords=$(exiftool -c "%+.6f" "$1" |grep "GPS Position" | cut -d":" -f2 | tr -d ' ') | |
[[ -z "$coords" ]] && { echo "Error: Coords not found"; exit 2; } | |
echo "Coord=${coords}" | |
xdg-open "http://geo.klein-computing.de/gpx_tool.html#${coords}" | |
exit 0 |
replace
sensible-browser
withxdg-open
,
Yes thanks for your feedback, you're right. I just replaced that. Hope that script helps you!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My Linux system doesn't know the
sensitive-browser
command. It would therefore be good to replacesensible-browser
withxdg-open
, which would probably make the script work on any Linux systems.