Skip to content

Instantly share code, notes, and snippets.

@shikhalev
Created June 27, 2020 12:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shikhalev/1cc7cfafbbb36f740c72154dc522b3a5 to your computer and use it in GitHub Desktop.
Save shikhalev/1cc7cfafbbb36f740c72154dc522b3a5 to your computer and use it in GitHub Desktop.
#!/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