I am working on a Spotlight importer for FITS image. For those who
are not familiar with FITS files, this is the format of most
astronomical data, and is usually made of a header containing
keywords and values, and then data in a binary or text form. Some
keywords in the header are standard, but users can also make their
own keywords. So I was wondering: would it be possible to create an
importer which attributes could be customized?
I would imagine a small application wich would help manage the
spotlight attributes of the importer. When the user makes a change
(adding or deleting a keyword), Spotlight would be informed that a
change occurred and would reindex FITS files. The attributes would
be stored in a plist file somewhere, and when a FITS file is
indexed, the importer would read the plist file to know which
keywords need to be indexed.
Does that make any sense? Do you think it can be made?
Well, AFAIK custom attributes have to be defined in the Info.plist
(or was it XML schema?) of an importer, so your app would have to
edit that file (and thus get admin privileges so you can change the
importer bundle) if you wanted to be able to add custom attributes.
But apart from that, everything else already is dynamic, and it
should be trivial to do what you want.