Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- geo(){
- #Use: geo [option]
- # -g for open in Googlemaps
- # -w for open in Wigle.com
- la=$(termux-location | sed -n 2p | sed 's/.*tude": //' | tr -d ',')
- lo=$(termux-location | sed -n 3p | sed 's/.*tude": //' | tr -d ',')
- if [[ "$1" = "-g" ]]; then
- termux-open-url http://www.google.com/maps/place/$la,$lo/@$la,$lo,16z ; fi
- if [[ "$1" = "-w" ]]; then
- termux-open-url https://wigle.net/map?maplat=$la&maplon=$lo&mapzoom=19&mapstyle=standard&coloring=qos ; fi
- w3m -dump "http://nominatim.openstreetmap.org/reverse?format=json&lat=$la&lon=$lo&zoom=20&addressdetails=1" | tr ',' '\n' | sed -n '16,25p' | tr -d '"}' | sed 's/..*://' | sed '10d' | sed 4d > .tmp
- echo "Aktueller Standort"
- echo $(sed -n 2p .tmp) $(sed -n 1p .tmp)
- echo in $(sed -n 7p .tmp) $(sed -n 4p .tmp)
- echo $(sed -n 5p .tmp)
- echo Bundesland $(sed -n 6p .tmp)
- echo $(sed -n 8p .tmp); rm .tmp
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement