About mimetypes and action definitions

Ilmari Heikkinen kig at misfiring.net
Wed Dec 22 17:08:22 EET 2004

Hello everyone,

A couple of questions:

1) Shared-mime-info is great. Is there interest in expanding the 
descriptions with capability descriptions?

Capability descriptions being type metadata that says what the type can 
do; e.g. ogg is sound, sound is temporal, ogg is lossy, ogg supports 
the following bitrates...
All this in some standard programmatically parseable format.

This since I'm (re)writing a converter tool that plugs existing tools 
together and need to write capability descriptions[1] for the reasoning 
algo. So I thought "Hey, these might be of use to other people aswell, 
can't hurt to ask, right?"

The descriptions could also be used for e.g. finding types that fit 
into some criteria ("video types that are recommended for web") and for 
creating type documentation.

2) Related to the above, I've been following the mime actions 
discussions with some interest, since "How do I open a file that has 
type foo?" is a subset of the more general "How do I represent foo as 

The answers can be represented relation triplets that represent 
type-program-type relations (what types a program can read and what it 
can turn them into): "audio/x-wav --lame-> audio/x-mp3", or  "image/png 
--gqview-> view", or "image/png --gimp-> edit". Again, this is what I 
need to do (and have done[2]) for the converter to describe what a 
program can do, so maybe these can be shared aswell.

3) And finally, command descriptions. Machine-readable man pages, if 
you will. Can be used to auto-build interfaces, generate documentation, 
or (what I'm doing) plug programs together into parametrized pipelines 
("text into 128kbps mp3") by abstracting the interface into a keyword 
parser ("high quality" means -q 0 for lame, -q 10 for oggenc, and 
-quality=100 for pnmtojpeg.)[3]

The command descriptions (can) also include the package name that 
installs the command (these should probably be lists of 
package:distro=pkgname unless all distros standardize to same package 
names or move to 0install ;-)). Am using those to automatically install 
the package if needed.

Is there interest in a command description spec such as this?

I need to write all three things above anyhow, but if these sound 
useful to other people, let me know. Some easy to see possibilities: 
context menus with "convert to"- and "view/open/edit in"-items, expert 
system for learning about fileformats, synonym-searchable command help.


These are the what the current version is, considering moving to RDF 
import and export with YAML as the human-readable format in version 2.

[1] http://conversio.sourceforge.net/ccp-1.6.3/types/image-types.xml
[2] http://conversio.sourceforge.net/ccp-1.6.3/fml/ghostscript.xml
[3] http://conversio.sourceforge.net/ccp-1.6.3/fml/lame.xml

Ilmari Heikkinen <irkheikk cs helsinki fi>

More information about the xdg mailing list