Created
January 15, 2015 09:00
-
-
Save m42e/c800eb4be47eb1788d87 to your computer and use it in GitHub Desktop.
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
import photos | |
import clipboard | |
import webbrowser | |
img = photos.pick_image(include_metadata=True) | |
meta=img[1] | |
gps = meta.get('{GPS}') | |
if gps: | |
latitude = str(gps.get('Latitude', 0.0)) + gps.get('LatitudeRef', '') | |
longitude =str(gps.get('Longitude', 0.0)) + gps.get('LongitudeRef', '') | |
clipboard.set('%s, %s' % (latitude, longitude)) | |
else: | |
clipboard.set('Last photo has no location metadata.') | |
webbrowser.open('workflow://') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment