Help with json files

Started by qwermk, October 25, 2013, 01:18:16 PM

Previous topic - Next topic

qwermk

Hi!
First I would like to thank Phil Harvey for this excellent tool. I have used some time to read information from photos that I have on a server. These photos are in multiple folders and each created a json file. The program worked well, but sometimes I have problems when trying to read exiftool many photos. The program was developed for Mac OSX with Automator software. We explain how the program runs to have an idea where I can help to optimize the process. The execution steps are as follows.

1. The commands are in a workflow in automator, the first obtains the routes of all items on a specific folder.
2. Then run the following exiftool command with Shell Script (/ bin / bash):

do
# generate json file with common tags from all images in a directory
exiftool -stay_open True -@ et_json.args "$f" > pz.json
done


Where "$ f" is the variable where routes are all the files found in the folder.

Et_json.args File contains the following:

-r
-e
-n
-fast2
-G
-t
-m
-q
-j
-filename
-directory
-filetype
-headline
-subject
-TransmissionReference
-Instructions
-stay_open
False


3. The command creates a file that containing the information of all the found files in json format with the metadata specifies that the file is set up with et_json.args.

The program I use to read metadata and files PSD , JPG , RAW and DNG . The software is more extensive and contains more executions, but is in the exiftool where I have more drawbacks.

Attach an example of the files described so that they can more easily analyze .

I have doubts with the et_json.args file execution and how it could optimize it to make it faster and efficient  ???

Phil Harvey

You are not using the -stay_open option correctly.  This is used to get ExifTool to read from a dynamically-generated argfile.

For best performance, you should only launch exiftool once.

In your case it may be as simple as calling ExifTool with the names of all the files you want to process on the same command line.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).