ChatGPT knows a lot about Opus

ChatGPT answers Opus-related questions surprisingly well, especially those about programming, like from this thread:

Guess I need to start looking for a new job soon :wink:

6 Likes

Wow! Really impressed!

I signed up this morning.
I was never any good at chess, but now I can play Regular Expressions with ChatGPT .
ChatGPT couldn't do the expressions I have posted in Rename Presets in one line, it needed at least two.

Those got started long long ago in this thread .

It is interesting to see what ChatGPT generates but the code quality is questionable at times as per the following example. However, I can certainly see potential as a "kick starter". My question was:

Generate JScript code for Directory Opus to loop through all files and select only those with keyword metadata.

function OnInit(initData)
{
    initData.name = "Loop Through Files With Keywords";
    initData.default_enable = true;
    initData.min_version = "12.0";
}

function OnClick(clickData)
{
    var cmd = clickData.func.command;
    cmd.deselect = false;
    cmd.ClearFiles();

    var folderEnum = DOpus.FSUtil.ReadDir(clickData.func.sourcetab.path, false);

    while (!folderEnum.complete)
    {
        var fileItem = folderEnum.next;
        var metadata = DOpus.Create.Map();
        fileItem.Metadata.GetTags(metadata);

        if (metadata.exists("keywords") && metadata("keywords").count > 0)
        {
            cmd.AddFile(fileItem);
        }
    }

    cmd.RunCommand('Select ALLFILES');
}