Adding separator to keywords for languages...

Started by Archive, May 12, 2010, 08:54:36 AM

Previous topic - Next topic

Archive

[Originally posted by pixelpicker on 2009-05-28 01:03:20-07]

Hello to all and special to Phil,

I would like to add a separator sign to every listed keyword, caption and headline for the images of a folder to be able to distinguish between languages.

The keyword list now looks like this: car, table, crunchy

and should be like this with the separator: | car, | table, | crunchy

This means I have to add the pipe to each list item of the keywords.

Same with catption and headline, which should afterwards look like this:

| blabla text in the caption

| blabla text in the headline.

I tried it with

Code:
exiftool -keywords -sep "|" DIR
but it didn't work - thought as much Smiley - likely this can be done with composite userdefined tags, but I have no clue what operation to construct.

Greetings from

Bette

Archive

[Originally posted by exiftool on 2009-05-28 11:44:38-07]

Hi Bette,

Here is a config file for you:

Code:
%Image::ExifTool::UserDefined = (
    'Image::ExifTool::Composite' => {
        MyKeywords => {
            Require => 'Keywords',
            ValueConv => q{
                my @list = ref $val eq 'ARRAY' ? @$val : ($val);
                $_ = "| $_" foreach @list;
                return \@list;
            },
        },
        MyCaption => {
            Require => 'Caption-Abstract',
            ValueConv => '"| $val"',
        },
        MyHeadline => {
            Require => 'Headline',
            ValueConv => '"| $val"',
        },
    }
);
1;  #end

Read the config file documentation for details on how to
install this file.  Also, if you have problems read FAQ number 3
to be sure you are using the correct tag names.

- Phil

Archive

[Originally posted by pixelpicker on 2009-05-28 15:33:10-07]

Ahhh! Thank you so much Phil!!!

Workds 1a! Smiley))

Have a good day.

Many Greetings

Bette