Skip to content

Instantly share code, notes, and snippets.

@oscarmorrison
Last active November 6, 2015 17:43
Show Gist options
  • Save oscarmorrison/6a92ce348d9a91090219 to your computer and use it in GitHub Desktop.
Save oscarmorrison/6a92ce348d9a91090219 to your computer and use it in GitHub Desktop.
import subprocess
raw_location = subprocess.check_output("whereami", shell=False)
raw_location = raw_location.split()
lat = raw_location[1]
lon = raw_location[3]
hashtag = "#latlon"+lat+"__"+lon
command = "echo "+ "\'" + hashtag + "\' | pbcopy"
p = subprocess.Popen(['pbcopy'], stdin=subprocess.PIPE)
p.stdin.write(hashtag)
p.stdin.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment