Images with GPS tags - Nautilus integration 2/2

The following two scripts are helpful for integrating the gpsPlacename.sh into nautilus:

nautilus-gps-link.sh will show the GPS position of the selected image in Google Maps.
If multiple images are selected, the first 10 GPS positions will be displayed in a static Google Map (did not find out how to display multiple markers in a dynamic map)
Zenity is used for displaying a progress bar, so please make sure to have zenity installed as well.
WARNING: wordpress adds additional single quotes (””””””””) to each single quote when saving this article, please replace duplicate ”” with a single instance
#!/bin/bash
if [ $# == 1 ] ; then
gpsPlaceName.sh -vv “$@” | tee /tmp/gpsPlaOutxxx.txt | zenity –progress –pulsate –auto-close ; cat /tmp/gpsPlaOutxxx.txt | grep dynamicmap | cut -d ””””””””””””””””””””””””””””””””>”””””””””””””””””””””””””””””””” -f 2- | xargs -n 1 -x -d ””””””””””””””””””””””””””””””””n”””””””””””””””””””””””””””””””” firefox
else
gpsPlaceName.sh -vv “$@” | tee /tmp/gpsPlaOutxxx.txt | zenity –progress –pulsate –auto-close ; cat /tmp/gpsPlaOutxxx.txt | grep staticmap | cut -d ””””””””””””””””””””””””””””””””>”””””””””””””””””””””””””””””””” -f 2- | xargs -n 1 -d ””””””””””””””””””””””””””””””””n”””””””””””””””””””””””””””””””” firefox
fi

nautilus-gps-place.sh will show the nearest place to the GPS positions of the selected image in a dialog using zenity.
#!/bin/bash
gpsPlaceName.sh -v "$@" | tee /tmp/gpsPlaOutxxx.txt | zenity --progress --pulsate --auto-close ; zenity --text-info --filename=/tmp/gpsPlaOutxxx.txt --width 800 --height 800 ; rm /tmp/gpsPlaOutxxx.txt

Example Dialog:
gps

To integrate this into Nautilus you should install nautilus-actions, then run nautilus-action-config-tool to add new entries:
nautilusaction

Kommentarfunktion ist deaktiviert