Ben Summers presents
Spotlight, the way you've always wanted it!

Extending existing importers

SpotMeta allows you to add extra metadata to files which is dervied from the file's content, but is not extracted by the default importers.

Simply write an importer in the normal way. However, set the supported UTI to a dummy value which will be never matched. Then, to run the importer after all files, add this key to the Info.plist file:

	<key>SpotMetaImporterExtendsAllTypes</key>
	<true/>

If you would like to only run after specific file types, specify them like this:

	<key>SpotMetaImporterExtendsTypes</key>
	<array>
		<string>public.html</string>
		<string>public.plain-text</string>
	</array>

As an example, the source (and binaries) for a CryptographicHash importer is provided. This adds MD5 and SHA1 metadata to all files, allowing you to search for files by their hash, once everything has been reindexed.

CryptographicHashSource.zip -- source, as an XCode project.

CryptographicHashBinary.zip -- precompiled binary.

To use the binary, unzip it and place it in ~/Library/Spotlight.

Installation

Once a importer is added which extends existing importers, the relevant importer server must be restarted. This can be accomplished with the following command:

	killall mdimportserver

 

SpotMeta

Home

Download SpotMeta