Scripting and the Thesaurus - both metadata and keyword

Started by Ferdinand, July 22, 2013, 08:46:02 AM

Previous topic - Next topic

Ferdinand

First of all, let me say that this is not a high priority compared to debugging the beta.

Unless I've missed something, there are no scripting methods for manipulating the two thesauri.  I'd like to suggest that you consider including them.  I can think of several instances where they might be useful.

1.  It's possible that someone will build an app that corresponds roughly to the IPTC editor in V3.6.  At preset, metadata entry is done mainly in the metadata panel, and while that's useful, more functionality could be included in an app.  But this would need access to the thesaurus.

2.  People may want to write scripts to import and export the thesaurus from/to other formats.

3.  I'd like to take that cats to keywords script of mine and rework it so that it uses native V5 methods, and this would include adding items to the thesaurus and marking them as Group or Exclude.

Again, I'm not suggesting that this is a high priority.

Mario

That's on  my list already. Implementing an object model for the thesaurus will require some effort. The thesaurus a lot of methods and properties per node, plus recursive processing of child nodes, synonyms, tree traversal etc. We'll need several classes for that and all that. I'll look into this after the initial version of IMatch 5 has been released.

Quote2.  People may want to write scripts to import and export the thesaurus from/to other formats.

Until we have an object model for the thesaurus, it should be quite easy to write a script which produces a file in one of the four thesaurus input formats already supported. Such a script could be written in any language, from JavaScript to Excel Basic.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mario

I have thought about this. Implementing an object model for the thesaurus would be quite complicated - to create and maintain. And I wonder if more than a handful of users would ever use it. Or more than once.

It's much easier to produce a text file (from a script) and then import this info the thesaurus.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook