How to hide process of scanning while importing metadata photo?

Started by refrain, March 28, 2015, 01:27:23 AM

Previous topic - Next topic

refrain

Hi,

I tried to import ExifTool_config in a directory of images then I tried to import csv file into it. But I want to hide the process (like showing information of exif), is there way to hide it?


and also when i tried to import csv file into metadata photo, I want to hide the failure process while importing them. Because some of data have no sourcefile. then I want to show the details or mention the filename of images which is updated. How can I do this?



I execute those process using shell script and exiftool. I need your help and suggestion. Thanks in advance.  :)

Regards,
Intan

Phil Harvey

I don't understand exactly, but this seems more like a Linux question (I assume that is what you are running), and not an ExifTool question.

- 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 ($).

refrain

Hi Phil,

I execute this script:
exiftool -config ExifTool_config dir
ExifTool_config that I used is to define custom tag like altitude, airspeed, temperature, pressure, roll, pitch and yaw. dir means a directory of images. after i run those code in the terminal, then exiftool will show me exif information of images. I want to hide those process. Can't I?

Then I execute this script to import other data (like gpslatitude, gpslongitude, altitude, airspeed, temperature, pressure, roll, pitch and yaw), which is saved as csv file, to photo like this:
exiftool -csv=test.csv  dir
but if the source file is not match (between sourcefile in csv file and dir), so it will show like this:
No SourceFile '/home/intannd/foto/IMG_0733.JPG' in imported CSV database
(full path: '/home/intannd/foto/IMG_0733.JPG')

I want to hide that too. Can't I?

I hope you understand what I mean. Thank you.

Regards,
Intan

Alan Clifford

In saying "hide" do you mean not display on the terminal screen?

Hayo Baan

Hayo Baan – Photography
Web: www.hayobaan.nl

Phil Harvey

Hi Intan,

You say "hide the process", so my first thought is to make it so that you couldn't see the cpu process with a process monitor (eg. "top"), which I don't think can be done.

Alternatively, perhaps you mean "hide the window", in which case this is likely possible, but it is not an ExifTool question.

Or if you mean "redirect the exiftool output so it doesn't go to the console", then this may certainly be done, and is a shell question.

Finally, as Hayo mentioned, if you mean "suppress exiftool output", then this is an exiftool question, and may be done with -q or -q -q.

- 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 ($).

refrain

Quote from: Alan Clifford on March 28, 2015, 02:04:54 PM
In saying "hide" do you mean not display on the terminal screen?
Yeah, that's what i mean. do you have any idea how to do it?

Quote from: Hayo Baan on March 29, 2015, 03:25:52 AM
Have you already tried the -q (quiet) option?
Quote from: Phil Harvey on March 29, 2015, 09:08:26 AM
Finally, as Hayo mentioned, if you mean "suppress exiftool output", then this is an exiftool question, and may be done with -q or -q -q
I have tried the -q or -q -q option like this:
exiftool -config -q ExifTool_config dir or exiftool -config -q -q ExifTool_config dir
but it didn't work as I wish, the output is still shown in the terminal like this:
======== foto/IMG_0695.JPG
ExifTool Version Number         : 9.75
File Name                       : IMG_0695.JPG
Directory                       : foto
File Size                       : 1992 kB
File Modification Date/Time     : 2015:02:17 10:58:48+07:00
File Access Date/Time           : 2015:03:29 21:48:32+07:00
File Inode Change Date/Time     : 2015:03:25 22:24:08+07:00
File Permissions                : rw-------
File Type                       : JPEG
.............etc

I really want to hide those output. do you have any idea?

Alan Clifford

exiftool photo.jpg > /dev/null

If exiftool writes to stderr as well, you may need this

exiftool photo.jpg &> /dev/null


refrain

Quote from: Alan Clifford on March 29, 2015, 05:11:08 PM
exiftool photo.jpg > /dev/null
If exiftool writes to stderr as well, you may need this
exiftool photo.jpg &> /dev/null

Hi, Alan.
I have tried your suggestion, and it works and it can hide all information of images, like exif information of images have been hide and not display in terminal as well. But I want to show the result of details information of scanning images in the terminal, like this:
1 directories scanned
58 image files read


But when i tried to hide of this information:
No SourceFile '/home/intannf/foto/IMG_0662.JPG' in imported CSV database
(full path: '/home/intannf/foto/IMG_0662.JPG')
No SourceFile '/home/intannf/foto/IMG_0736.JPG' in imported CSV database
(full path: '/home/intannf/foto/IMG_0736.JPG')
No SourceFile '/home/intannf/foto/IMG_0770.JPG' in imported CSV database
(full path: '/home/intannf/foto/IMG_0770.JPG')

I think this code exiftool -csv=test.csv dir &> /dev/null or exiftool -csv=test.csv dir > /dev/null don't work, because those failure information is still shown in the terminal. I just need to show the information like this:
1 directories scanned
3 image files updated

and if it's possible, I want to show the details information of images that has been updated,  like this:
/home/intannf/foto/IMG_0771.JPG is updated
/home/intannf/foto/IMG_0777.JPG is updated
/home/intannf/foto/IMG_0779.JPG is updated


Do you have any idea?

Hayo Baan

To not show any errors, use exiftool options 2>/dev/null
But I think that apart from this, you might need some more filtering. The grep command is your friend here. E.g. like so exiftool options 2>/dev/null | grep "updated\|scanned" to only show lines with updated or scanned in them. If there is error output that contains lines you want, simply redirect the errors to the standard output as well like so: exiftool options 2>&1 | grep "updated\|scanned"

I think this should get you started  :)
Hayo Baan – Photography
Web: www.hayobaan.nl

refrain

Hi, Hayo Baan

Thanks for your helps. I have tried it and it works successfully! I have another problem now.  actually, when I run command to synchronize/import csv file to images in a directory, it will show information like this, for example:
1 directories scanned
3 image files updated

The problem that I have is I want to show the details of images file updated, like this (for example):
1 directories scanned
3 image files updated:
    IMG_111.JPG is updated
    IMG_222.JPG is updated
    IMG_333.JPG is updated

I think if I can show the details of file name of images, it will make us easier to know the image which is updated. Do you have another suggestion? Somebody please help me to find this out. Thanks in advance.

Regards,
Intan

Phil Harvey

If you add the -v0 to the command then ExifTool will print the name of each file that it processes (to stdout).  All of these files will be updated unless either a "Nothing changed" message is printed (to stdout), or there is an error (to stderr).

- 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 ($).

refrain

Quote from: Phil Harvey on April 02, 2015, 09:33:49 AM
If you add the -v0 to the command then ExifTool will print the name of each file that it processes (to stdout).  All of these files will be updated unless either a "Nothing changed" message is printed (to stdout), or there is an error (to stderr).

- Phil

Hi, Phil
I've tried to run command like this:
exiftool -v0 -csv=foto.csv /home/intan/foto 2>&1 | grep "scanned\|updated"

but i only got this message:
1 directories scanned
17 image files updated


the name of each file which is updated is not shown on terminal. Would you mind to explain it more?

Regards,
Intan

Phil Harvey

Hi Intan,

Try removing your 'grep' so you can see the lines I was talking about.

- 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 ($).