Example or Template command Line commands, CSV files and images

Started by colink, May 18, 2018, 02:08:33 PM

Previous topic - Next topic

colink

As a newbie trying to get my head around  creating a CSV file to write data I think it would be very useful to have some examples that users could start with that just need copy and paste - maybe these already exist.

I find myself reading several threads and wishing I could see the CSV being referred to.

The following would be useful for me.

2 examples images - 1 populated with a small amount of data the other with lots of data.

A few exifTool commands with explanation of each part of the command to extract all or some data from the images.

One or more example CSV files (with commands) for importing some or lots of data to a few images.

These same images (with data just imported) available to read either with ExifTool or online readers (I know most of these use ExifTool).

I think this would go a long way to getting Newbies started and hopefully cause fewer forum posts, using less of Phil's time - which he is very generous with.

ColinK




Phil Harvey

Quote from: colink on May 18, 2018, 02:08:33 PM
2 examples images - 1 populated with a small amount of data the other with lots of data.

The MWG web site has lots of samples.

QuoteA few exifTool commands with explanation of each part of the command to extract all or some data from the images.

exiftool image.jpg

(what's to explain?  OK, you can add "-use MWG" if you want to see the MWG Composite tags.)

QuoteOne or more example CSV files (with commands) for importing some or lots of data to a few images.

You can generate these yourself like this:

exiftool -csv test1.jpg test2.jpg ... > out.csv

then import the CSV back again like this:

exiftool -csv=out.csv test1.jpg test2.jpg ...

Also, there are lots of example commands in the exiftool application documentation.  Plus detailed explanations of each option.

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

colink

Hi Phil
Thanks again for your valuable time and pointer to MWG examples.

"What's to explain?" - lots, I will ask specific questions when I need help.

Thanks for the guidance on exporting and importing to create examples. Generating export data myself does not get me very far unless I start with an image that  has many fields populated.  I was hoping to find an image example populated with lots of data to export, to then edit the csv to import the data I want to use. Though I have not found such an image I have found a number of images from multiple sources that gives me a lot of fields to export and work from.

Colink

StarGeek

Quote from: colink on May 20, 2018, 07:10:56 AMI was hoping to find an image example populated with lots of data to export, to then edit the csv to import the data I want to use. Though I have not found such an image I have found a number of images from multiple sources that gives me a lot of fields to export and work from.

The format is dead simple.  The first row has the names of all the tags you want to write.  Just look at the pages under Tag Names and find the one you want.  You can specify just the tag name or the full Group:Tagname.  Except for the first column that needs to be the SourceFile, the order of the columns doesn't matter.

The only thing to watch out for is list type tags such as Keywords/Subject.  You just need to make sure and use the -sep option so they are stored as individual tags and not just one big tag.

But if you really want to get a file filled with a ton of metadata, here's this thread has the ARG file I used to populate my test file.  Just run a command like this:
exiftool -@ /path/to/!WindowsPropertyBase.Arg TestFile.jpg
and you'll have a test file with over 1,400 metadata tags to work with.  In most cases the tag will be filled with the name of the tag if possible (e.g. XMP-dc:Description is filled with the value "XMP-dc:Description"), otherwise with a unique value compared to similar tags.  For example, EXIF:ISO has a different value than XMP:ISO

After you fill the test image, run
exiftool -G1 -a -s -csv TestFile.jpg >Tags.csv
to get your csv file.

Actually, I thing I'll spin this ARG file off into it's own thread and edit this post to link to that thread.

Edit: Created a new thread just for the test file arg file.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype