Filetags2.js.txt (51.4 KB)
Overview
Filetags2
can be used to quickly preview, edit, tag and annotate files. It uses the DOpus Viewer, image editors like MS Paint or Photoshop, and the Everything 1.5a utility to leverage the functionality that they provide. Files of any type can be viewed and tagged but the primary focus is image files, typically digital photographs.
The development of this script was prompted by a forum request from @abr Filetags - file tagger and metadata viewer - #32 by abr to make the original Filetags dialog window resizeable. This looked straightforward but it proved to be a lot more "interesting" than I thought and before long Filetags2 developed into a complete rewrite. It relies on features that are only available in recent versions of DOpus 13 (at least 13.13.5) and Everything 1.5a (at least 1.5.0.1373a).
Hopefully Filetags2 operation is largely self evident. Navigation can be done by clicking buttons or by pressing hotkeys for those who prefer to use the keyboard. Many user defined options are available via script preferences. These can be accessed from the dialog by right clicking the Quit | Prefs
button. Restart the dialog after making changes. Some defaults are described below.
By Default
-
Filetags2 opens with only selected items in scope, or all items in the current folder if no items are selected. This behaviour can be modified by setting the
All
option to True in script preferences or starting with theALL
command line option. alt+s can be used to toggle between All and Selected. -
the dialog opens with two editable metadata fields: User Comment and Tags. Set the
imagedesc
script preference to true or use theIMAGEDESC
command line option to open with a third metadata field which is editable for images and static for other file types. -
clicking an image preview opens the current file with the DOpus viewer. Shift-click or alt+e opens with editor1 as defined in script preferences (if available) and Ctrl-click or alt+f opens with editor2.
-
right clicking a preview or alt+x advances to the next file and alt+z or rclick in combination with any qualifier key goes back to the previous file. The default rclick action can be changed in script preference to open editor1 or editor2.
-
f10 can be used to toggle an information overlay on the image preview, similar to the DOpus standalone viewer information overlay.
Buttons
Clicking Next
with a qualifier key held down will jump to the last in-scope item; similarly clicking Previous
with a qualifier key held down will jump to the first in-scope item.
Items can be star rated using the Rate
button or one of the rating hotkeys. The default rating hotkeys are alt+0 through alt+5. Clicking Rate
in combination with the Shift key will prompt for a rating to be applied to all in scope items.
If the current item is geotagged the Map
button will be enabled and can be use to locate where the photo was taken. The user's preferred map utility (Open Street Map, Google Maps, Bing Maps) is set in script preferences. If Everything 1.5a is installed then Nearby
will be available as a right click option on the Map | Nearby
button. For Nearby
to work, geotags must be indexed in Everything Properties. See Properties - voidtools forum .
Existing tags read from disk are sorted and presented line by line. When adding, replacing, or editing, tags can be entered in any order and in any way that DOpus understands. Multiple tags entered on the same line must be separated with semicolons. For example: +holiday;+france;-italy. Care needs to be taken not to inadvertently replace all existing tags. As editing takes place the Apply
button is enabled. No changes are made until Apply
or alt+a is clicked or the user moves to the next or previous file. When using the Apply
button the default is to apply changes to the current file. If a qualifier key is pressed in combination with Apply
changes will be applied to all items. By default, a confirmation dialog is shown. This can be overriden with the noconfirmmulti
option in script preferences.
When metadata is written to disk there is a time lag before the updated data can be read back to repopulate the editable fields. Filetags2 attempts to allow for this by introducing a short delay between writing the updated metadata and reading it back into the relevant editable fields. If the "old" data persists use the Refresh button. The delay duration in milliseconds can be set in script preferences.
Clicking the Add to coll://
button does what you would expect. Right clicking the Add to coll://
button opens the specified collection in a new lister. If no collection is specified, or the named collection does not exist, all existing collections are listed.
If Everything properties are configured to index tags then the Find
button will prompt for tags to be searched. Matching tags are listed in a collection named evquery. Right clicking the Find
button will open the evquery collection in a new lister.
Per @abr's original request, the dialog is now resizeable.
Here are a couple of sample screenshots, both taken with the imagedesc
option set to true and the second one was taken with information overlay (f10) active.