Page 1 of 1

Photoshop files keywords

Posted: 03 Oct 2021 05:17
by kirk234
Can XYplorer see, show and search by keywords in psd files ? Import and convert them into its own tags ?

Re: Photoshop files keywords

Posted: 03 Oct 2021 07:37
by highend
Only via (scripted) custom columns
exiftool is required for this and the more custom columns that use this, the slower it will be
Import and convert them into its own tags ?
Into XYplorer's tag database? Sure, but again, only via scripting

Re: Photoshop files keywords

Posted: 03 Oct 2021 08:57
by kirk234
Are customers supposed to know Python or something or is it something pretty simple so we could modify an example or use a few typical expressions?

I have zero coding experience so how useful the soft would be for me? Lets say I am willing to try with such script that read psd keywords and turn them into XY database tags . Where should I start?

I need a kind of DAM not only for images but 3d files like .blend or .max from Blender and 3d max and wonder how XYplorer could suite in the role?
Since I already use keywords for images it's kind of an important part

Re: Photoshop files keywords

Posted: 03 Oct 2021 09:48
by highend
That depends.

E.g.: Import the description for the current (single) selected file as an XYplorer tag

Code: Select all

$app  = "D:\Tools\@Command Line Tools\exiftool\exiftool.exe";
    $desc = trim(runret("""$app"" -s -s -s -description ""<curitem>"""), <crlf>, "R");
    tagitems("tags", $desc, <curitem>);
Of course it would be way better to run exiftool only once by specifying a directory instead of a file and let it read all necessary information at once and parse that within the script and do the tagging.

Code: Select all

    $app = "D:\Tools\@Command Line Tools\exiftool\exiftool.exe";
    end (exists($app) != 1), quote($app) . <crlf 2> . "not found, aborted!";

    // Get the "Description" and the "Exif image width"
    $properties = <<<>>>
description
exifimagewidth
    >>>;
    $properties    = trim($properties, <crlf>);
    $cntProperties = gettoken($properties, "count", <crlf>);
    end (!$properties), "No properties defined, aborted!";

    // Join properties
    $propSingle    = "";
    $propFormatted = "";
    foreach($property, $properties, <crlf>, "e") {
        $propSingle    .= " -" . $property;
        $propFormatted .= "<:>${" . $property . "}";
    }

    // Put them together for the exif command
    $cmd = <<<>>>
-q $propSingle -p "${directory;s(/)(\\)g}$filename$propFormatted" "<curpath>"
    >>>;

    // Run it and do the tagging
    $lines    = trim(runret("""$app"" $cmd"), <crlf>, "R");
    $cntLines = gettoken($lines, "count", <crlf>);

    while ($i++ < $cntLines) {
        $line = gettoken($lines, $i, <crlf>);
        $file = gettoken($line, 1, "<:>", "t");
        // If something went wrong and the output doesn't contain a file
        if (exists($file) != 1) { continue; }

        // Use a loop here
        // It would allow to do the tagging via "ex" columns a bit easier
        $tags = "";
        $j    = 0;
        while ($j++ < $cntProperties) {
            $tag   = gettoken($line, $j + 1, "<:>", "t");
            $tags .= $tag . ",";
        }
        $tags = formatlist($tags, "esd", ",");

        if ($tags) { tagitems("tags", $tags, $file); }
    }
Imho it's way more complicated to use exiftool than XYs scripting language^^

I'm not aware of a cli tool that reads metadata from .blend / .max files but that doesn't mean anything, I'm not using such files...

Re: Photoshop files keywords

Posted: 03 Oct 2021 17:08
by kirk234
Thanks highend for trying to help . But so far I can't make it work , The first script makes my psd file "pressENTER" tag

Re: Photoshop files keywords

Posted: 03 Oct 2021 17:42
by highend
The stand-alone Windows executable does not require Perl. Just download and un-zip the archive then double-click on "exiftool(-k).exe" to read the application documentation, drag-and-drop files and folders to view meta information, or rename to "exiftool.exe" for command-line use. Runs on all versions of Windows.
So rename exiftool^^ And if the tag is empty afterwards, your file doesn't have that description property^^

Use exiftool "path and file you've tried it with"
from a command prompt and look what properties + values it returns
Animation.gif

Re: Photoshop files keywords

Posted: 03 Oct 2021 17:57
by admin
BTW, you know any good tool that lets me step thru animated gifs frame by frame?

Re: Photoshop files keywords

Posted: 03 Oct 2021 18:06
by highend
Ulead GIF Animator can do this. Incredible old but still very useful. The last version was 5.05 from iirc 2002...
Animation.gif

Re: Photoshop files keywords

Posted: 03 Oct 2021 18:43
by admin
Thanks!* Found something newer in the meantime: https://www.screentogif.com/ (I had an older version of it that could not do it, but the newer one has a nice viewer and editor)
2021-10-03_184942.png
* I tried to download Ulead GIF Animator and it felt like walking through the worst part of town at night. The software downloading business is not something you want to deal with anymore. Or do you know any trustworthy download site?