Skip to content

Instantly share code, notes, and snippets.

@Jzarecta
Created January 17, 2021 04:32
Show Gist options
  • Save Jzarecta/9cec60aae97a6f6975bb7f682bb4d80e to your computer and use it in GitHub Desktop.
Save Jzarecta/9cec60aae97a6f6975bb7f682bb4d80e to your computer and use it in GitHub Desktop.
Lanza un mapa en un navegador usando la direccion desde el portatpapeles o linea de comando
#! /usr/bin/python3
# mapIt.py - Lanza un mapa en un navegador usando la direccion desde el
# portatpapeles o linea de comando
import webbrowser, sys, pyperclip
if len(sys.argv) > 1:
# Obten la direccion desde la linea de comando
address = ' '.join(sys.argv[1:])
else:
# Obten la direcci[on del portapapeles
address = pyperclip.paste()
webbrowser.open('https://www.google.com/maps/place/' + address)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment