Skip to content

Commit 085ab22

Browse files
add: find my loc on map
1 parent 67d3cba commit 085ab22

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

automation/mapit.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#! python3
2+
# mapIt.py - Launches a map in the browser using an address from the
3+
# command line or clipboard.
4+
5+
import webbrowser, pyperclip, sys
6+
7+
if len(sys.argv) > 1:
8+
# Get address from command line
9+
address = ' '.join(sys.argv[1:])
10+
else:
11+
#TODO: Get address from clipboard
12+
address = pyperclip.paste()
13+
14+
webbrowser.open('https://www.google.com/maps/place/' + address)

0 commit comments

Comments
 (0)