categories -> thesaurus ?

Started by Joe Austin, October 26, 2014, 05:40:35 PM

Previous topic - Next topic

Joe Austin

I would like to recreate a branch of my category tree as a branch in my thesaurus (keywords).   I don't want to assign the elements as keywords in any files at this point, I just want to create this category branch structure in the thesaurus.   

I've looked at exporting the category branch using the category export feature, but that doesn't seem to create the right format for importing into  the thesaurus.

Is this possible?

Ferdinand

That's odd, I thought you could do this, but I just checked and it seems that IMatch 5 only imports .imcs files from IMatch 3 and not its own .imcsx files.

You can do this using my Categories to Hierarchical Keywords script.  You only want to output a thesaurus file, so leave all the keyword export options unchecked / blank.  This will export a .txt file of the kind that LightRoom uses, which you can then import into the thesaurus.

Mario

I have added the ability to import IMatch 3 category schemata to the the thesaurus to make migration from IMatch 3 to IMatch 5 easier for users.
Thesaurus has it's own exchange format so there is no need to be able to import IMatch 5 categories.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

cytochrome

#3
Quote from: Mario on October 27, 2014, 08:17:12 AM
....
Thesaurus has it's own exchange format so there is no need to be able to import IMatch 5 categories.

Could you explain how to do this: get the categories into the thesaurus using "its own exchange format"?  More precisely: how to export the whole category tree as a txt or xml file.

When I try to import the Category export I get an error : The file cat.....xml could not be imported, the format is wrong !!

Francis

Mario

There is no categories into thesaurus import format. The thesaurus can store it's own data into an XML file, and load it again from there. Importing IMatch 5 categories into an IMatch 5 thesaurus is no feature I plan to implement. If you really need something like this, you can write a small script which exports your categories into a format the IMatch 5 thesaurus can import. See the thesaurus help for details about the supported import formats.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Joe Austin

Quote from: Ferdinand on October 26, 2014, 11:03:27 PM
That's odd, I thought you could do this, but I just checked and it seems that IMatch 5 only imports .imcs files from IMatch 3 and not its own .imcsx files.

You can do this using my Categories to Hierarchical Keywords script.  You only want to output a thesaurus file, so leave all the keyword export options unchecked / blank.  This will export a .txt file of the kind that LightRoom uses, which you can then import into the thesaurus.

Thanks,  this worked on a test database, I'll try it on my production database tonight.

For the scope, I selected "Current Category" , but does the scope matter if your only intention is to create the .txt dump of the category structure (and all the 'write' boxes are cleared) ?

Ferdinand

Quote from: Joe Austin on October 27, 2014, 12:40:23 PM
For the scope, I selected "Current Category" , but does the scope matter if your only intention is to create the .txt dump of the category structure (and all the 'write' boxes are cleared) ?

Good point.  Now that you mention it, I think you only need to run on one file, and the thesaurus export option will iterate over all the categories you entered in the category selection box.  So it doesn't matter whether than file you notionally run the script on is assigned to any of those categories or not, if all you're doing is a thesaurus export.

cytochrome

OK, with Ferdinand's script it works fine and simple, and its enough to select just one file... perfect

Francis