Last active
August 29, 2015 13:57
-
-
Save marcellmars/9717475 to your computer and use it in GitHub Desktop.
redshiftme - runs gtk-redshift with coordinates by just running: `redshiftme city`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#use: redshiftme city | |
import geopy, sys, subprocess | |
coords = "44.820556:20.462222" | |
try: | |
coords = str(geopy.GoogleV3().geocode('{}'.format(sys.argv[1]))[1]).replace(', ', ':').replace('(','').replace(')','') | |
except: | |
pass | |
subprocess.call(["redshift-gtk", "-l", coords]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment