Main Menu

READ Keywords to clipboard

Started by klemmleuchte, July 09, 2015, 06:29:31 AM

Previous topic - Next topic

klemmleuchte

Hello,

sorry, can't find any thread like this:

I need a exiftool-command, which reads IPTC-keywords from file to clipboard, listed in row, separated with commas.

It's to export keywords via clipboard into a input-mask on my photo-portal at ipernity.com.

Any help for me? Thank you!

Best regards, Eike

Phil Harvey

ExifTool does not deal with the clipboard.  But there may be some other utility you can pipe the exiftool output through.  But to help, I would need to know what system you are using.

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

klemmleuchte

Thanks for your answer, Phil!

It is a pity that exiftool not communicating with the clipboard.

I'm working with Windows 8.1 x64.

Regards, Eike

klemmleuchte

Hello Phil,

would you please help, how to pipe the keywords with ExifTool?
Please give advise, which tools you mean for Win8.1.

Thanks, Eike

StarGeek

#4
Try
exiftool -S -keywords FILE | clip

* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

klemmleuchte

#5
Thank you!
Tried, but i'm not sure with syntax.

Quoteexiftool -S -keywords {filepath$} | clip

{filepath$} = takes the first marked file in my filemanager

But I don't know how to use 'clip'.

Kann you please help me, StarGeek?

Hayo Baan

Clip is a windows command line utility that simply takes the input and puts it on the clipboard. In the sample you showed, you are simply "piping" (the |) the output of the exiftool command to clip, so the result will be the output of the exiftool command on the clipboard. Just as you wanted!

Note: errors will not end up on the clipboard, these will still go to the console.

Hope this helps,
Hayo
Hayo Baan – Photography
Web: www.hayobaan.nl

klemmleuchte

Thanks Hayo!

Now it works! I don't know, what happened before. I did no changes...

But finally the output is not formatted as I would like. The commata are added to spaces and the row is startet with what it is: "Keywords: ".

Am I able to eliminate "Keywords: " at side of ExifTool or Windows? A little script to handle this?

ryerman

Use -s3, instead of -S, to remove the tag name from the output.

Use exiftool -p "${keywords;s/, /,/g}" {filepath$} | clip to format the output with only comma separators, not commas and spaces.
s/, /,/g is a PERL expression.
PERL expressions can be used to help format the output when using the -p option.
See the documentation.
Windows 10 Home 64 bit, Exiftool v12.61

StarGeek

My mistake about -S instead of double checking the correct usage.

And using -sep "," is another option.

For example
exiftool -s3 -sep "," -keywords {filepath$} | clip
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

klemmleuchte

OK boys, I have to say thank you. My DOPUS-Button works as should.

You're really great, and i love ExifTool. It's the most helpful tool for me i got in the last years.

BTW I found out, what happened, as the command did not work: It was simple to run the command as MS-DOS Batch and not as DOPUS... :-(

Thank you for your help.

Best regards, Eike