leocharre has asked for the wisdom of the Perl Monks concerning the following question:
# cat /usr/share/mime/packages/yaml.xml
<?xml version="1.0" encoding="utf-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="text/yaml">
<comment>YAML document</comment>
<comment xml:lang="bg">Документ — YAML</comment>
<comment xml:lang="ca">document YAML</comment>
<comment xml:lang="cs">Dokument YAML</comment>
<comment xml:lang="de">YAML-Dokument</comment>
<comment xml:lang="en_GB">YAML document</comment>
<comment xml:lang="es">documento YAML</comment>
<comment xml:lang="eu">YAML dokumentua</comment>
<comment xml:lang="fi">YAML-asiakirja</comment>
<comment xml:lang="fr">document YAML</comment>
<comment xml:lang="hu">YAML dokumentum</comment>
<comment xml:lang="it">Documento YAML</comment>
<comment xml:lang="ja">YAML ドキュメント</comment>
<comment xml:lang="ko">YAML 문서</comment>
<comment xml:lang="nb">YAML-dokument</comment>
<comment xml:lang="nl">YAML-document</comment>
<comment xml:lang="nn">YAML-dokument</comment>
<comment xml:lang="pl">Dokument YAML</comment>
<comment xml:lang="pt_BR">Documento YAML</comment>
<comment xml:lang="sv">YAML-dokument</comment>
<comment xml:lang="uk">Документ YAML</comment>
<comment xml:lang="vi">Tài liệu YAML</comment>
<acronym>YAML</acronym>
<glob pattern="*.yml"/>
<magic>
<match value="---" type="string" offset="0"/>
</magic>
<expanded-acronym>Yaml Aint Markup Language</expanded-acronym>
</mime-type>
</mime-info>
# mimetype t/files-yaml/* t/files-yaml/CVS: inode/directory t/files-yaml/data.yml: text/yaml t/files-yaml/head.var: text/plain t/files-yaml/head.yml: text/yaml t/files-yaml/yaml.dat: text/yaml
# file t/files-yaml/* t/files-yaml/CVS: application/x-not-regular-file t/files-yaml/data.yml: text/plain; charset=us-ascii t/files-yaml/head.var: text/plain; charset=us-ascii t/files-yaml/head.yml: text/plain; charset=us-ascii t/files-yaml/yaml.dat: text/plain; charset=us-ascii
Questions..
Is there a more posixy accepted method of registering mimetypes that I'm missing (which is surely staring me in the face)?
Does registering types via the mime database seem like a good way to do this? And if so- how do I configure 'file' command to work as 'mimetype' (no, please.. no symlinks, i mean, like.. serioulsy, like..)
Should I perhaps be investigating how to get 'file' to recognize a new mimetype, before I try to get 'mimetype'/freedesktop.org to?
|
|---|