2011-04-25

By Xyne

mimeo

Meta

AUR:32911
Arch Forum Thread:86855
Binary Package:xyne-any/mimeo-2011.06.23.2-1-any.pkg.tar.xz
PKGBUILD:pkgbuilds/mimeo
Repos:[xyne-any]
Source Package:mimeo-2011.06.23.2.tar.gz
Taurball:mimeo.tar.gz
Version:2011.06.23.2

About

Mimeo uses MIME-type file associations to determine which application should be used to open a file. It can launch files or print information such as the command that it would use, the detected MIME-type, etc. It is also possible to use regular expressions to associate arguments with applications. The most common example is to open URLs in browsers or associate file extensions with applications irrespective of their MIME-type.

Mimeo tries to adhere to the relevant standards on freedesktop.org and should therefore be compatible with other applications that set or read MIME-type associations, e.g. PCManFM.

Please notify me of any non-standard behavior and I will try to correct it.

Editing MIME-types

Mimeo is able to update MIME-type associations (add, remove, clear) and configure defaults. It can also update MIME-cache files and check for invalid desktop entries. See "mimeo --help" for more information.

Examples

Associate shell scripts with Leafpad.

test is an extensionless Bash script.

# find Leafpad's desktop file
> mimeo --app2desk leafpad
leafpad
  leafpad.desktop  /usr/share/applications/leafpad.desktop

# determine "test" file's MIME-type
> mimeo -m test
test
  text/x-shellscript

# associate "text/x-shellscript" with Leafpad
> mimeo --add text/x-shellscript leafpad.desktop

Association File Examples

These are just a few quick examples of how to create associations using the associations file. See "mimeo --assoc-help" for more information.

Open URLs with Firefox:

/usr/bin/firefox %U
  ^http://

Open the following files with medit by extension: Perl (.pl), Python (.py), Haskell (.hs)

/usr/bin/medit %F
  \.p[ly]%
  \.hs%

Open various media files in VLC by extension:

/usr/bin/vlc --one-instance --playlist-enqueue %F
  \.mp3$
  \.flac$
  \.avi$
  \.mpg$
  \.flv$

Changelog

2011-04-25

  • added "--quiet" option to suppress output when running applications

2011-03-12

  • loading of desktop files in subdirectories & further standard-compliance
  • URI handling via "x-scheme-handle/*" MIME-types
  • special handling of 'file' URIs
  • new output format for some operations

2011-02-22

Mimeo subsumed Mimeman's functionality, with needed corrections. Mimeman was a dirty kludge created without any knowledge of the standard. Mimeo is now able to manage MIME-type associations and create desktop files.

Mimeo's algorithm for determing associations has also been corrected in several places.