Re: Associating packages with file types using appstream succeeded
Le Wed, Feb 10, 2016 at 07:15:02PM +0100, Petter Reinholdtsen a écrit :
>
> The goal was to use appstream to announce file format support in a
> non-GUI package (aka one without a .desktop file), and we used the khmer
> package as an example. It is now listed as a package supporting the
> application/vnd.oxli.countgraph MIME type:
>
> % appstreamcli what-provides mimetype application/vnd.oxli.countgraph
> Identifier: oxli [generic]
> Name: khmer
> Summary: in-memory DNA sequence kmer counting, filtering & graph traversal
> Package: khmer
> ----
> %
>
> To do this, we added debian/khmer.metainfo.xml with the following
> content and installed it in /usr/share/appdata/:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <component>
> <id>oxli</id>
> <metadata_license>MIT</metadata_license>
> <name>khmer</name>
> <summary>in-memory DNA sequence kmer counting, filtering & graph traversal</summary>
> <description>
> <p>
> khmer is a library and suite of command line tools for working
> with DNA sequence. It is primarily aimed at short-read
> sequencing data such as that produced by the Illumina
> platform. khmer takes a k-mer-centric approach to sequence
> analysis, hence the name.
> </p>
> </description>
> <mimetypes>
> <mimetype>application/vnd.oxli.countgraph</mimetype>
> </mimetypes>
> </component>
Hi Petter,
this is a great result, especially now that it is easy for any project to submit
new media types to the IANA.
I added the following information to the MimeTypesSupport page in the Debian wiki:
Packages can declare support for media types using the AppStream system, by
placing metainfo XML files in /usr/share/appdata/, with names such as
<package>.metainfo.xml. Commands like appstreamcli will then be able to report
which package supports which media types, and package managers will be able to
suggest the package for installation.
https://wiki.debian.org/MimeTypesSupport#For_package_installation
Corrections or improvements are welcome !
Have a nice day,
--
Charles
Reply to: