

execfile( script.getResource("../libs/import_utils.py").getAbsolutePath() )

import os
from java.io import File

import_from_module("imagegpsmetadata","ImageGPSMetadata")

def main(*args):
  folder = script.getResource("data/test-images").getAbsolutePath()
  metadata_reader = ImageGPSMetadata()
  for image in os.listdir(folder):
    metadata_reader.load(File(os.path.join(folder,image)))
    print "Image %s, %s %s %s" % (image, metadata_reader.getDate(), metadata_reader.getTime(), metadata_reader.getPoint())
