Thursday, February 15, 2007

Let file(1) recognize a chemical MIME type - the next level

As written earlier, the file command may detect chemical MIME types, if you feed its database with the necessary definition rules. Now check out the cmd.magic.mime file and run the file command with

$ file -m cmd.magic.mime -i your_test_file.ext

for one or more chemical files. The detection is limited to chemical MIME types, that have magic pattern in the chemical-mime-data database.

The file cmd.magic.mime was created via XSLT conversion of the original chemical-mime-data database and can be used for KDE and file(1). One of the following package releases (probably 0.1.95) will provide it.


Unfortunately this magic.mime file cannot be used for KDE. As pointed out by David Faure, KDE uses an older syntax that doesn't know e.g. the search type. So I have to find another solution for KDE or wait for better days.