Skip to main content

⚠️ Please note that this topic or post has been archived. The information contained here may no longer be accurate or up-to-date. ⚠️

missing vocabularies

Comments

11 comments

  • macsrock
    hope I remember this correctly....

    You need to create a "carrier" image.
    Import an image, tag that image with all the keywords you want to add to the other catalog.
    Then move that image to the other catalog. You now have all keywords in the new catalog.

    This image can be used to keep and share your keyword list, so to speak.
    Or you could create several carrier images that are broken down into catagories....sports, wildlife etc.


    Not sure where I about heard this but I want to shake their hand!
    I think it was "OldToad" the dude is a master with IView.
    0
  • William Macy
    Thanks Macsrock, I'll give your method a shot.

    Bill
    0
  • William Macy
    Making a carrier image with all the key words in a catalog would work for only a few keywords. I have a lot- hundreds in a given catalog sometimes.

    I think what I need is a script to extract the keywords from all the selected images and then write those words to the empty default vocabulary. I haven't a clue how to write such a script. Anyone please?

    Thanks, Bill
    0
  • imaginatian
    Hi,

    The following script will generate a web page containing a sorted list of keywords used in the selected images. It's written in XSL, so will work on both PCs and MACs.

    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html" version="1.0" encoding="iso-8859-1" indent="yes"/>
    <xsl:template match="/">
    <html>
    <head>
    <title>Keywords in Catalog &apos;<xsl:value-of select="CatalogType/Catalog"/>&apos;
    </title>
    </head>
    <body>
    <p>Sorted list of Keywords <b>used</b> in catalog &apos;<xsl:value-of select="CatalogType/Catalog"/>&apos;
    </p>
    <xsl:for-each select="CatalogType/MediaItemList/MediaItem/AnnotationFields/Keyword">
    <xsl:sort select="." order="ascending" data-type="text"/>
    <xsl:choose>
    <xsl:when test="position() > 1 and not(. = ./preceding::node())">
    <xsl:value-of select="."/>
    <br></br>
    </xsl:when>
    <xsl:when test="position() = 1">
    <xsl:value-of select="."/>
    <br></br>
    </xsl:when>
    </xsl:choose>
    </xsl:for-each>
    </body>
    </html>
    </xsl:template>
    </xsl:stylesheet>


    You need to carefully copy this code into a text file and save this with a extension of ".xsl" e.g. "keywords.xsl". If on a PC then in Notepad you can put quotes around the full file name and it will save it like this - not sure if there's a MAC equivalent.

    Then select the images you want to produce a keyword list for. A word of warning. If you select thousands of images then the script might fail. If it doesn't fail then it might still take some time to complete i.e. I've just tested this on about 5000 images on a powerful laptop with 8GB of RAM and MediaPro spent a couple of minutes with "not responding"! For a change this is not actually an issue with MediaPro but rather the tool they are using to do the XSL conversion. Conversely I remember communicating with the iView team to suggest they update to a better version many, many years ago. Then it went to Microsoft and nothing happened and then.......

    Anyway once you've saved this XSL script and you've selected the images - and they need to be online for it to work, which is a bug - then from the "Make" menu select the "XML Data File..." option. Make sure the "Annotations" tick box is checked. For speed make sure the "Media Properties" and "EXIF Data" boxes are not checked. Whatever you do don't tick any of the bottom 5 boxes otherwise it will take forever and start creating thumbnails etc.

    At the bottom of this dialog is a "+" button. Click on this and it will prompt you for an XSL file. You need to select the file just created. Once this is done select the "Make..." button. This will then prompt you for where to save the output. It will default to your catalog name and ".xml". Instead change this to something ending in ".html" e.g. "keywords.html" (without the quotes!). Depending on the number of images selected twiddle your thumbs or go and make a cup of tea.

    When it's complete you can open the resulting file in the browser of your choice and you will see the list of keywords. You can then copy this into a vocabulary file as required.

    I posted this solution on either the iView or Expression forum years ago but don't know if they still exist or not.

    Anyway hope this helps.

    Ian
    0
  • macsrock
    [quote="NN265503UL2" wrote:
    Making a carrier image with all the key words in a catalog would work for only a few keywords. I have a lot- hundreds in a given catalog sometimes.

    I think what I need is a script to extract the keywords from all the selected images and then write those words to the empty default vocabulary. I haven't a clue how to write such a script. Anyone please?

    Thanks, Bill



    It will work...but it is a tedious process. You can't select multiple keywords...so selecting 5000 is a little daunting.
    You can also make a copy of your catalog. Delete all images and the keywords remain.

    I don't think any method will be easy...the script instructions are quite involved.
    0
  • William Macy
    Many thanks Ian for the script. I will most certainly give it a try. I thought I remembered seeing something of the sort a while back but couldn't relocate it now that I need it.

    HAVE A HAPPY THANKSGIVING,
    Bill
    0
  • William Macy
    Hi Ian- I tried your method on my Mac.When I surround the file keyword.xsl with quotes and then go to "Make" an d click the + button to add the keyword.xsl file that file is not selectable in the catalog view that opens. It happens to be on my desktop, but the file is greyed out. If I delete the quotes I can chose it and then run "Make" . The catalog name that then appears is the one from which I have selected n images to extract the keywords from plus .xsl. In c an change that file type to html, but then the message saying the file is incorrect appears. Perhaps I'm missing something.

    Bill
    0
  • imaginatian
    Bill,

    I went through my instructions again to make sure I wasn't missing anything and also to try them in Media Pro. To be honest I prefer to use my original iView software as for my needs it works better - aka doesn't regularly lock up or crash. Anyway I've gone through it all from a Windows perspective. I was a bit alarmed to see that my XSL code didn't actually work. For reasons unknown - I haven't used XSL at work for several years now and have forgotten most of it! - it was missing one of my keywords. I've reworked it and now it provides all the keywords. The downside is that they are not sorted anymore but the upside is that it's a bit quicker to finish. The new code is as follows:

    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml" encoding="UTF-8" indent="yes"/>

    <xsl:key name="keyword" match="CatalogType/MediaItemList/MediaItem/AnnotationFields/Keyword" use="."/>

    <xsl:template match="/">
    <html>
    <head>
    <title>Keywords in Catalog &apos;<xsl:value-of select="CatalogType/Catalog"/>&apos;</title>
    </head>
    <body>
    <p>List of Keywords <b>used</b> in catalog &apos;<xsl:value-of select="CatalogType/Catalog"/>&apos;</p>

    <xsl:for-each select="CatalogType/MediaItemList/MediaItem/AnnotationFields/Keyword[generate-id()= generate-id(key('keyword',.)[1])]">
    <br></br>
    <xsl:value-of select="."/>
    </xsl:for-each>
    </body>
    </html>
    </xsl:template>
    </xsl:stylesheet>


    So you need to resave the above code into keywords.xsl. When I said to put quotes around this file name this was specific to Windows Notepad and stops it putting .txt on the end of the file name. I don't know if there's a Mac equivalent. Whatever you do you don't want the quotes in the actual file name!

    Then select the images you want to export a list of keywords for. If you don't select a whole catalogue then you need to hide the unselected images with the "show selected" menu option.

    http://imaginatian.com/xMedia_images/xsl-1.jpg

    Then from the Make menu select XML Data File option. This will present the following screen and you need only the highlighted tick box checked.

    http://imaginatian.com/xMedia_images/xsl-2.jpg

    Then click the "+" button and in the new dialog select the keywords.xsl file.

    http://imaginatian.com/xMedia_images/xsl-3.jpg

    Then click the Make button to create the output file. Replace the default - the catalogue name plus .xml - with something ending in .html to make a web page. The Windows version doesn't mind whatever the file name is - I regularly create DOS batch files with some XSL scripts I have. See next image.

    http://imaginatian.com/xMedia_images/xsl-4.jpg

    This will then think for a while and produce the output file. The images I've run this for produce the following web page:

    http://imaginatian.com/xMedia_images/xsl-5.jpg

    I hope this clears things up a bit.

    Ian
    0
  • Daniel2
    [quote="NN265503UL2" wrote:
    I tried your method on my Mac.
    If you have put your configuration in signature I would have answered earlier.
    Here is an Applescript that does what you ask.
    Get keywords
    It produces a text file ready for vocabulary.
    0
  • William Macy
    Thank you all for the help on re-populating my vocabularies. I think I see one error I made copying the the program file, but will try the revise one and the Applescript presently. Happy Thanksgiving where that is applicable. Bill
    0
  • William Macy
    Ian and Daniel2 you are great! Being lazy, I tried your Applescript first Daniel,2 putting it in the scripts folder of my library. I then opened a catalog that had keywords, did a find to find those images where keyword was not blank, went to the a annotations menu, selected keywords and voilà a text file of keywords. Super and many thanks.

    Bill
    0

Post is closed for comments.