Women in Technology

Hear us Roar



Article:
  Creating Spotlight Plugins
Subject:   matadata plugins
Date:   2007-02-18 02:01:45
From:   PhilipOrr
Just a quick question.


Is it possible to get a list of all mdimporters on the system and what extensions they handle through Cocoa. Something similar to the mdimport -X command.


Thanks


Phil

Full Threads Oldest First

Showing messages 1 through 2 of 2.

  • Matthew Russell photo matadata plugins
    2007-02-19 04:55:07  Matthew Russell | O'Reilly AuthorO'Reilly Blogger [View]

    I haven't looked into this extensively, but from reviewing Apple's "Spotlight Importer Programming Guide", I'm led to believe that as of now (remember Spotlight is still kinda new), there may not be a great answer. This quote

    <blockquote>
    New Spotlight importers are detected by comparing the date of the top-level .mdimporter directory.
    If the date is the same as a previously loaded importer, the new importer is not detected. If you copy
    the updated importer to the Spotlight directory using
    cp -r
    the change is not noted by Spotlight.
    The solution is to either remove the existing importer before copying the updated version, or use the
    touch
    command on the importer's .mdimporter directory to explicitly update the date
    </blockquote>

    makes me think that Spotlight is keeping dibs on the directories where plug-ins live, acting accordingly, and there isn't a single file somewhere that gets updated. (Otherwise that doc may have simply had you reference it.) You may want to hit up the Cocoa-dev mailing list and see if anyone knows differently...or if Leopard is going to offer a new way to do this.
    • matadata plugins
      2007-02-19 15:02:28  PhilipOrr [View]

      Yeah I know It seems a strange way to operate these plugins. I did start an Apple Lists question, though very slow to come up with anything at the moment and Leopards documentation, even with the seeded versions is still very slim to offer up anything.

      Phil