mirror of
https://github.com/metafy-social/python-scripts.git
synced 2024-11-23 20:11:10 +00:00
Added Google Maps Finder script
This commit is contained in:
parent
00a7e6ee14
commit
b871192c63
6
scripts/google_maps_finder/README.md
Normal file
6
scripts/google_maps_finder/README.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
# Google Maps Finder
|
||||
This is a simple script that will open the default web browser to the Google maps of the address given as the command line argument.
|
||||
|
||||
## Usage
|
||||
1. Clone the repo
|
||||
2. Run python script.py "place to search"
|
11
scripts/google_maps_finder/script.py
Normal file
11
scripts/google_maps_finder/script.py
Normal file
|
@ -0,0 +1,11 @@
|
|||
import sys
|
||||
import webbrowser
|
||||
|
||||
if len(sys.argv) > 1:
|
||||
map_string = ' '.join(sys.argv[1:])
|
||||
webbrowser.open('https://www.google.com/maps/place/' + map_string)
|
||||
|
||||
else:
|
||||
print("Pass the string as command line argument.")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user