Created
June 27, 2020 12:31
-
-
Save shikhalev/1cc7cfafbbb36f740c72154dc522b3a5 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
#!/usr/bin/ruby | |
def apply latitude, longitude, files | |
len = files.length | |
files.each_with_index do |file, idx| | |
system("exiftool -GPSLatitude=#{latitude} -GPSLongitude=#{longitude} -Latitude=#{latitude} -Longitude=#{longitude} -XMP:GPSLatitude=#{latitude} -XMP:GPSLongitude=#{longitude} #{file}") | |
puts "#{idx} of #{len}: #{file}" | |
end | |
end | |
apply 56.392262, 58.507706, %w{ | |
IMG_7183.CR2 | |
IMG_7184.CR2 | |
IMG_7185.CR2 | |
IMG_7186.CR2 | |
IMG_7187.CR2 | |
IMG_7188.CR2 | |
IMG_7189.CR2 | |
IMG_7190.CR2 | |
IMG_7191.CR2 | |
IMG_7192.CR2 | |
IMG_7193.CR2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment