Columns Viewer

This simple script-addin command allows you to view and copy virtually all column values available in Directory Opus.
While working with other programs and metadata/properties, I have sometimes encountered the need to know the equivalent name/keyword in DOpus that displays the same information. Since there is no quick way to display all this information, I decided to make it possible and share it with the community.

Some of its main features are:

  • List almost all values available in DOpus for built-in columns.
  • List script column values.
  • List Evaluator column values.
  • List column values for enabled Shell Properties .
  • Search by name, label, header or value, with the possibility as well as being able to configure search options from the same dialog (match case, regular expressions, ignore diacritics and whole words).
  • Ability to copy selected values to clipboard.
  • Multilanguage UI (available in all languages included in DOpus).

HOW TO INSTALL

Download the file below. Then run Prefs SCRIPTINSTALL and select the downloaded file.

:warning: IMPORTANT: Needs at least v13.5.1

v1.3.0 : ColumnsViewer.opusscriptinstall

USAGE

Once installed, you can access the command by running COLUMNSVIEWER %fullpath%, where %fullpath% is the full path of the file or folder to use. Remember to use quotes if it contains spaces. Otherwise, if you just use COLUMNSVIEWER , the first selected item in the active tab is used.

Once the data has been read, a dialog window appears that allows you to view, search, and copy the retrieved data.
You can sort by values in any column and search for matching values in Name, Label and Header.
When one or more rows are selected in the list, the Copy Selection button appears, allowing you to copy all values from all columns in the selection. You can also use Ctrl+C for the same purpose.
If you want to specify which columns to copy, you can use the menu that appears when you right-click on the selection.

The Refresh button (or the F5 key) allows you to refresh all values.
The :x: button clears the value entered in the search field.
You can choose how the search will be performed, through a dialog window accessible by clicking on the glyph next to the search icon.

Finally, you're even able to drop an item in the dialog window, to load it.

OPTIONS

In the Script Management window (Settings / Scripts), select Columns Viewer and click in Configure button.

  • log level:Logging level to be displayed.
    • OFF to show only errors.
    • DEBUG to show all messages.
    • STANDARD to show only the most relevant information.
    • WARNING to show messages that needs your attention.
  • ignored_script_columns: List of the script names (as seen in the "Names" column in Script Management) that you do not wish to use with this command. All columns for those scripts are going to be ignored.
  • values obtention method: Choose the way values for Script, Evaluator and Shell columns are going to be obtained. Currently available options are Rename Presets(default) and Evaluator. (detailed in NOTES below).
  • dialog size mode : Choose how the dialog window will resize when open.
    • AUTO : Auto resize based on screen resolution and list dimensions.
    • LAST USED: Remember the last window size and position.

NOTES

  • If FILE argument is used (you provide a item fullpath), and that item is not in the current active tab (or there's no tab at all), the command will use Rename Presets, given the impossibility of using Evaluator method under those circumstances.

Main differences to take into account when choosing between Rename Preset and Evaluator method:

  • Rename Presets makes use of the possibility of getting column values when renaming a file, but it doesn't actually rename anything. For that purpose, creates temporary rename presets, that are deleted after use.
  • Evaluator makes use of the possibility of getting column values when setting a textual filter. Some downsides when using this method :
    • Some values may not be retrieved under certain circunstances (if interested, search in the forum for issues with Evaluator related with columns).

CHANGELOG

v1.3.0 (Apr 21, 2024) : ColumnsViewer.opusscriptinstall (14.9 KB)

  • Now the dialog uses the font name/size configured in Preferences / Colors and Fonts / Fonts > Dialogs.
  • Empty column values are now shown instead of being skipped.
  • Improvements when using with the FILE argument.
  • Code updated/cleaned up.
Full changelog

v1.2.2 (Feb 22, 2024)

  • Added a fix when the dialog or its progress dialogs appeared, it messed up other listers/DO windows.

v1.2.1 (Feb 17, 2024)

  • Added obtention_method in Script Configuration, to change the way this command obtains values for Script, Evaluator and Shell columns. You can choose between Evaluator and Rename Presets.
  • Improved progress bar.
  • Improved launch when there's no tab/lister (e.g. via dopusrt.exe).
  • Other minor fixes.

v1.1.1 (Jan 26, 2024)

  • The command can now properly discard ghost columns.
  • Improved getting data from non built-in columns, especially when you have a huge amount of them.
  • Added a progress dialog when loading info.

v1.1.0 (Jan 23, 2024)

  • Minor corrections.

v1.0.9 (Jan 09, 2024)

  • Fixed 'Description' column value not retrieved correctly.
  • When using size_mode=auto on multiple screens, now (hopefully) the dialog opens centered on the monitor where the mouse is currently located.

v1.0.8 (Jan 08, 2024)

  • Improved the way the script handles with Shell Properties columns.
  • Fixed autosize dialog that was broken with last update.

v1.0.7 (Dec 23, 2023)

  • Added the ability to drop an item in the dialog window to load it.
  • Improved search functionality. You can now configure search options from the same dialog (match case, regular expressions, ignore diacritics and whole words are supported).
  • Minor fixes.

v1.0.6 (Dec 21, 2023)

  • Fixed an issue when retrieving labels and status values.

v1.0.5 (Nov 29, 2023)

  • It's no longer necessary to specify the main name for script columns whose script filename does not match with this value.

v1.0.4 (Nov 28, 2023)

  • Improved search functionality
  • Fixed shell properties columns sometimes not getting values
  • Added Esc Hotkey to close dialog
  • Added F4 Hotkey to set Categories to All
  • Added Shift+F4 Hotkey to focus Categories Combobox Control
  • Added F3 Hotkey to focus Search Field Control
  • Hint text for the Search Field Control is now multilanguage as well

v1.0.3 (Nov 21, 2023)

  • Code improvement. Now the results should be obtained faster.

v1.0.2 (Nov 21, 2023)

  • You can now choose to automatically resize the window or use the last used position and size.
  • Improved search functionality.
  • Code cleanup.

v1.0.1 (Nov 21, 2023)

  • Hopefully solved the problem of not getting any data for script columns, when you have a huge amount of them.
  • Added in configuration the option sc_cols_custom_names, which allows to manually define the main name/keyword for columns whose stem filename is different from its keyword (also to save processing time, as without this it would be necessary to parse each existing script looking for the name).

v1.0.0 (Nov 20, 2023) : Initial release

10 Likes

Running it on DOpusInstall-13.0.48.Beta.exe in my downloads folder had the side effect of renaming the selected file to .exe and also generates a lot of warning messages that read..

"C:\Users\admin\AppData\Roaming\GPSoftware\Directory Opus\Script AddIns\ColumnExifTool - Copy (2).js" does not exists in scripts folder

@aussieboykie In your configuration there is 1 file where all the info for scripts you ever installed are stored, and they are no longer deleted from that list. This script searches for those that are columns, are not listed as disabled and exist, hence those warning messages .
Since there is no direct way to get the values ​​for script columns, the command abuse of the possiblity of access to those values via renaming, so creates a rename preset and use Evaluator Val() function and a rename script to get the values. There's no actual renaming.
But I think (my guess) that some script columns keywords somehow breaks the renaming process, hence the file has been left without a name.
If you pass me that preset via DM, I can take a look at it and see where it doesn't work as it should. I think it's called "sc_columns"

When I click on your icon to send a DM your profile pops up as "not linked" which seems at odds with the fact that you are shown as linked in your posts. However, it means that I can't send you the relevant sc_columns.orp file by DM. Are you able to DM me?

@aussieboykie I already DM you

Doesn't show as unlinked here for me, but account linking has no effect on DMs either.

Oh, I think it's because the profile is hidden (from non-admins). I see the same if I go incognito.

I think I found the culprit, it's not the actual code in the rename preset, but seems related to the length of the TO value passed.
What I still do not understand is how it calculates this limit of characters, if it is the raw length of TO value, or if TO are keywords references to other values, it is the calculation of the length after obtaining those values...
I made the command to run a single rename to get all the values of the script and evaluator columns instead of running it for each column (e.g. in the case of having the ColumnExifTool script it would run more than 170 times!) because I didn't know that a limit was applied even if the rename script specifies not to do any renaming. Definitely something to analyze...

@aussieboykie I made a small change, you can download the script again and try it and see if it now works for you.

1 Like

useful script. thank you!
can it possible to save window's size and position?

v1.0.1 is up! Hopefully this fixes the parsing problem for script columns when the user has an enormous amount of them.
Also I add a new option in configuration, sc_cols_custom_names, to manually define the main name of a column. This is useful for columns that have a name defined other than the base name of the file, as it saves the time and effort of having to parse each script file looking for that data. So, if you notice that some script columns are not returning results when they should, you can check if the name you are getting is the correct one. To do this, open the file in a text editor and check in the OnInit() function that the declared name is the same as the script base filename. If it is different, you can add it manually to this option along with the filename.
E.g. "ColumnExifTool.js.txt": "ExifTool" (this example is already added by default)

v1.0.2 is up! Which allows you to use last window position and size.

2 Likes

For those who are testing v1.0.2 and have a lot of scipt columns installed (eg. ExifTool columns) can confirm if the command is working properly? I mean, are you getting the right values?

Analyzing more in detail the problem of version 1.0, I initially thought that it was due to a certain limit imposed on the pattern length that did not allow to return all values, but I think I was wrong. It seems to be related more to the presence of certain characters that break the renaming script.

Could you please test this version and let me know if you still get the correct data? The results should be much faster (like 50% faster).
ColumnsViewer.opusscriptinstall (13.4 KB)

confirmed both versions on scripts

1 Like

v1.0.3 is up. It should be faster and hopefully doesn't break things again

v1.0.4 is up with improvements for Shell Properties Columns and now the UI is completely multilanguage! Remember to update first to v13.0.50

3 Likes

v1.0.5 comes with a little but useful improvement: It's no longer necessary to specify the main name for script columns whose script filename does not match with this value. The only thing missing now is a way to obtain the label for these columns. (they are listed in scriptprefs.osd but there is no way to correlate the correct name/label order.)
One thing that needs to be clarified is that there may be ghost columns listed. This is because AFAIK there is no method to get all valid columns, and the scriptcolumns.oxc file stores all column names ever registered, whether they exist or not. The script takes care of filtering out most of them (file not existing, listed as disabled in scriptaddins.oxc or not listed in scriptprefs.osd), but it is not currently possible to do so completely (e.g. if a script ever declared a column and then removed it, it is still listed in scriptcolumns.oxc and will be listed as a ghost column when using this command).

2 Likes

In v1.0.6 labels and status values now are properly retrieved.

1 Like

i got this error on mp4 video (happens on any file, mkv. mp3 ...):

Summary

22/12/23 8:09 Evaluator: Error at line 4, position 7
Unknown value (6): seconds
if ((IsSet(ext)) || (ext="jpg"))
{if (IsSet(shootingtime))
seconds = DateDiff("s", shootingtime, Now());
s = seconds Mod 60;
m = seconds / 60 Mod 60;
h = seconds / 60 / 60 Mod 24;
d = seconds / 60 / 60 / 24;
ss = (d > 0 || s == 0) ? "" : s + "s";
mm = (m == 0) ? "" : m + "m ";
hh = (h == 0) ? "" : h + "h ";
dd = (d == 0) ? "" : d + "j ";
return Trim(dd + hh + mm + ss);}

P.S.
and this error on scripts

Summary

22/12/23 8:10 Columns Viewer: WARNING => Script : "C:\Users\DESKTOP\AppData\Roaming\GPSoftware\Directory Opus\Script AddIns\OrphanedXMP.osp\OrphanedXMP.js" does not exists in scripts folder
22/12/23 8:10 Columns Viewer: WARNING => Script : "C:\Users\DESKTOP\AppData\Roaming\GPSoftware\Directory Opus\Script AddIns\Real Header File Type Extension.osp\Real Header File Type Extension.vbs" does not exists in scripts folder

although they (OrphanedXMP.osp and Real Header File Type Extension.osp ) are there

PPS
the viewer's windows was opening, but in a second's monitor position without having it temporarily (i.e. was hidden from my eyes). now works, but errors stays

and now the script send all file in a folder to ExifTool:
22/12/23 10:29 ExifTool: 0:047 ... Handing over 282 files to ExifTool...

and what happens if i have 282000 files in a folder?