mimeapps - finding association between MIME types and applications

Eugene Wissner via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sat Apr 16 12:34:52 PDT 2016


On Saturday, 16 April 2016 at 18:48:36 UTC, FreeSlave wrote:
> mimeapps is a library for detection of which applications can 
> be used to open files of given MIME type.
>
> Note: this is essential only for systems that follow 
> Freedesktop specifications, i.e. Linux, BSD and some others. MS 
> Windows and OS X have their own file type associations systems.
>
> github repo: https://github.com/MyLittleRobo/mimeapps (examples 
> included)
> dub package: http://code.dlang.org/packages/mimeapps
> Specification: 
> https://www.freedesktop.org/wiki/Specifications/mime-apps-spec/
>
> Use cases:
>
> 1. Building "Open with" menu.
> 2. Finding user preferred application for specific file type, 
> e.g. text editor for text/plain or file manager for 
> inode/directory.
> 3. Finding user preferred application to open uri, e.g. user 
> preferred web browser for http and https links.
>
> Related libraries:
>
> https://github.com/MyLittleRobo/desktopfile - reading and 
> executing .desktop files.
> https://github.com/MyLittleRobo/mime - parsing shared MIME type 
> database and detecting MIME types of files.


Wow. I just wanted to port libmagic since need it. Can you write 
a short introduction how I can work with the magic database 
(defining mime type of a file based on its content)?


More information about the Digitalmars-d-announce mailing list