photools.com Community

IMatch Discussion Boards => General Discussion and Questions => Topic started by: Darius1968 on November 01, 2021, 07:29:25 PM

Title: A Hierarchical Output Of Keywords In FW Tip
Post by: Darius1968 on November 01, 2021, 07:29:25 PM
This post (https://www.photools.com/community/index.php?topic=8438.msg59256#msg59256) is a three-yr.-old FR, asking for the possibility, of enabling the thesaurus group-level entries to be reflected, under the @Keywords category, yet, not be actually included, in the files, themselves.  It concludes, with the very true and understandable declaration, that it would be so much, for so little - rewriting fundamental code, regarding how @Keywords are enumerated. 

That post did get me questioning, whether or not, it would be possible, to have the display of the keywords, via the FW Tip (or whatever), be in the form, of a hierarchical tree.  I ask, because I think, that it could, potentially, cut-down, on the space needed, as there (potentially) wouldn't be so many repeats of 'the 5 Ws', for instance. 

Title: Re: A Hierarchical Output Of Keywords In FW Tip
Post by: Mario on November 01, 2021, 08:09:40 PM
You could use replace to shorten "WHERE|location|country|"Germany to "Germany" or "WHAT|Motive|Landscape" to "Landscape" or "Motive|Landscape".
If you use very deep levels or many keywords per file (not many users do that) this may allow you to reduce the amount of text needed. And you can of course break each keyword into a single row.
You can use a smaller font etc.

I see no way to make the display "hierarchical". You probably can do this with XAML "by hand", but not in an automated fashion...
Maybe with the foreach function, the {index} variable and some custom padding, increasing it for every level. But something like this can keep you busy for hours. Or for a weekend.
See the Variables (https://www.photools.com/help/imatch/#var_basics.htm) for details.

Recalling that you use FW Tips with thousands of pixels in width (if this was you), it appears to me you are trying to cramp a unusual amount of info into the FW tips.
From my experience, most users use the default FW tip at the default width and also work with rather shallow keyword hierarchies and a few keywords per file. This means that showing all keywords in the tip or under each file in the FW is not a problem.
Title: Re: A Hierarchical Output Of Keywords In FW Tip
Post by: Darius1968 on November 01, 2021, 11:28:31 PM
Well, let's say, I have a file, with twenty-four hierarchical keywords, most of which, having the first five (or so) hierarchical levels, being repeated.  In this case, is there a way, that I can just flatten everything, and then, output the result, but have all the repeats just enumerate once? 
Title: Re: A Hierarchical Output Of Keywords In FW Tip
Post by: Mario on November 01, 2021, 11:33:05 PM
replace function? Maybe with foreach?
Title: Re: A Hierarchical Output Of Keywords In FW Tip
Post by: Darius1968 on November 02, 2021, 11:13:26 AM
Does the replace: function allow the use of regular expressions? 
Title: Re: A Hierarchical Output Of Keywords In FW Tip
Post by: Mario on November 02, 2021, 12:07:40 PM
The documentation does not mention it so I assume it does not. Else I would have explained that regular expressions are supported.
And it only takes a minute to test it in VarToy.
Title: Re: A Hierarchical Output Of Keywords In FW Tip
Post by: Darius1968 on November 02, 2021, 12:30:19 PM
On second thought, I don't think RegEx is supported, under replace:.  Because, in the several expressions, I used, to 'trim-the-fat', the pipe, | symbol was used, as it's involved, in the hierarchical representation, of the keywords.  And, if RegEx were supported, then | would probably have to be escaped, as that, therein, serves as the OR function