From 5286da2df9da69b5cbdca1041f83a6dc026a9e74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hubert=20Figui=C3=A8re?= Date: Sat, 29 Jun 2024 03:11:15 -0400 Subject: [PATCH] Added most of the image/x-dcraw extensions (#81) - https://github.com/freedesktop/xdg-shared-mime-info/blob/master/data/freedesktop.org.xml.in - Compared with the output of `gio info` Co-authored-by: Austin Bonander --- src/mime_types.rs | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/src/mime_types.rs b/src/mime_types.rs index c7156f9..4fb3f39 100644 --- a/src/mime_types.rs +++ b/src/mime_types.rs @@ -81,6 +81,7 @@ pub static MIME_TYPES: &[(&str, &[&str])] = &[ ("arc", &["application/x-freearc"]), ("arj", &["application/x-arj"]), ("art", &["image/x-jg"]), + ("arw", &["image/x-sony-arw"]), ("asa", &["application/xml"]), ("asax", &["application/xml"]), ("asc", &["application/pgp-signature"]), @@ -208,9 +209,12 @@ pub static MIME_TYPES: &[(&str, &[&str])] = &[ ("cpio", &["application/x-cpio"]), ("cpp", &["text/plain"]), ("cpt", &["application/mac-compactpro"]), + ("cr2", &["image/x-canon-cr2"]), + ("cr3", &["image/x-canon-cr3"]), ("crd", &["application/x-mscardfile"]), ("crl", &["application/pkix-crl"]), ("crt", &["application/x-x509-ca-cert"]), + ("crw", &["image/x-canon-crw"]), ("crx", &["application/x-chrome-extension"]), ("cryptonote", &["application/vnd.rig.cryptonote"]), ("cs", &["text/plain"]), @@ -238,7 +242,10 @@ pub static MIME_TYPES: &[(&str, &[&str])] = &[ ("davmount", &["application/davmount+xml"]), ("dbk", &["application/docbook+xml"]), ("dbproj", &["text/plain"]), - ("dcr", &["application/x-director"]), + ("dcr", &[ + "application/x-director", + "image/x-kodak-dcr", + ]), ("dcurl", &["text/vnd.curl.dcurl"]), ("dd2", &["application/vnd.oma.dd2+xml"]), ("ddd", &["application/vnd.fujixerox.ddd"]), @@ -271,6 +278,7 @@ pub static MIME_TYPES: &[(&str, &[&str])] = &[ ("dmp", &["application/vnd.tcpdump.pcap"]), ("dms", &["application/octet-stream"]), ("dna", &["application/vnd.dna"]), + ("dng", &["image/x-adobe-dng"]), ("doc", &["application/msword"]), ( "docm", @@ -329,6 +337,10 @@ pub static MIME_TYPES: &[(&str, &[&str])] = &[ ("eot", &["application/vnd.ms-fontobject"]), ("eps", &["application/postscript"]), ("epub", &["application/epub+zip"]), + ("erf", &[ + "application/x-endace-erf", + "image/x-epson-erf", + ]), ("es", &["text/javascript"]), ("es3", &["application/vnd.eszigno3+xml"]), ("esa", &["application/vnd.osgi.subsystem"]), @@ -567,8 +579,10 @@ pub static MIME_TYPES: &[(&str, &[&str])] = &[ ("jsonml", &["application/jsonml+json"]), ("jsx", &["text/javascript"]), ("jsxbin", &["text/plain"]), + ("k25", &["image/x-kodak-k25"]), ("kar", &["audio/midi"]), ("karbon", &["application/vnd.kde.karbon"]), + ("kdc", &["image/x-kodak-kdc"]), ("kfo", &["application/vnd.kde.kformula"]), ("kia", &["application/vnd.kidspiration"]), ("kml", &["application/vnd.google-earth.kml+xml"]), @@ -732,6 +746,7 @@ pub static MIME_TYPES: &[(&str, &[&str])] = &[ ("mqy", &["application/vnd.mobius.mqy"]), ("mrc", &["application/marc"]), ("mrcx", &["application/marcxml+xml"]), + ("mrw", &["image/x-minolta-mrw"]), ("ms", &["application/x-troff-ms"]), ("mscml", &["application/mediaservercontrol+xml"]), ("mseed", &["application/vnd.fdsn.mseed"]), @@ -764,6 +779,7 @@ pub static MIME_TYPES: &[(&str, &[&str])] = &[ ("nbp", &["application/vnd.wolfram.player"]), ("nc", &["application/x-netcdf"]), ("ncx", &["application/x-dtbncx+xml"]), + ("nef", &["image/x-nikon-nef"]), ("nfo", &["text/x-nfo"]), ("ngdat", &["application/vnd.nokia.n-gage.data"]), ("nitf", &["application/vnd.nitf"]), @@ -774,6 +790,7 @@ pub static MIME_TYPES: &[(&str, &[&str])] = &[ ("nnw", &["application/vnd.noblenet-web"]), ("npx", &["image/vnd.net-fpx"]), ("nq", &["application/n-quads"]), + ("nrw", &["image/x-nikon-nrw"]), ("nsc", &["video/x-ms-asf"]), ("nsf", &["application/vnd.lotus-notes"]), ("nt", &["application/n-triples"]), @@ -818,6 +835,7 @@ pub static MIME_TYPES: &[(&str, &[&str])] = &[ ("oprc", &["application/vnd.palm"]), ("opus", &["audio/ogg"]), ("orderedtest", &["application/xml"]), + ("orf", &["image/x-olympus-orf"]), ("org", &["application/vnd.lotus-organizer"]), ("osdx", &["application/opensearchdescription+xml"]), ("osf", &["application/vnd.yamaha.openscoreformat"]), @@ -878,6 +896,7 @@ pub static MIME_TYPES: &[(&str, &[&str])] = &[ ("pdb", &["application/vnd.palm"]), ("pde", &["text/x-processing"]), ("pdf", &["application/pdf"]), + ("pef", &["image/x-pentax-pef"]), ("pem", &["application/x-x509-ca-cert"]), ("pfa", &["application/x-font-type1"]), ("pfb", &["application/octet-stream"]), @@ -989,11 +1008,13 @@ pub static MIME_TYPES: &[(&str, &[&str])] = &[ ("qxl", &["application/vnd.quark.quarkxpress"]), ("qxt", &["application/vnd.quark.quarkxpress"]), ("ra", &["audio/x-pn-realaudio"]), + ("raf", &["image/x-fuji-raf"]), ("ram", &["audio/x-pn-realaudio"]), ("raml", &["application/raml+yaml"]), ("rar", &["application/x-rar-compressed"]), ("ras", &["image/x-cmu-raster"]), ("rat", &["application/rat-file"]), + ("raw", &["image/x-panasonic-rw"]), ("rc", &["text/plain"]), ("rc2", &["text/plain"]), ("rcprofile", &["application/vnd.ipunplugged.rcprofile"]), @@ -1037,6 +1058,8 @@ pub static MIME_TYPES: &[(&str, &[&str])] = &[ ("ruleset", &["application/xml"]), ("run", &["application/x-makeself"]), ("rvt", &["application/octet-stream"]), + ("rw2", &["image/x-panasonic-rw2"]), + ("rwl", &["image/x-panasonic-rw2"]), ("s", &["text/plain"]), ("s3m", &["audio/s3m"]), ("saf", &["application/vnd.yamaha.smaf-audio"]), @@ -1139,8 +1162,12 @@ pub static MIME_TYPES: &[(&str, &[&str])] = &[ ("spq", &["application/scvp-vp-request"]), ("spx", &["audio/ogg"]), ("sql", &["application/x-sql"]), + ("sr2", &["image/x-sony-sr2"]), ("src", &["application/x-wais-source"]), - ("srf", &["text/plain"]), + ("srf", &[ + "text/plain", + "image/x-sony-srf" + ]), ("srt", &["application/x-subrip"]), ("sru", &["application/sru+xml"]), ("srx", &["application/sparql-results+xml"]), @@ -1396,6 +1423,7 @@ pub static MIME_TYPES: &[(&str, &[&str])] = &[ ("x3dv", &["model/x3d+vrml"]), ("x3dvz", &["model/x3d+vrml"]), ("x3dz", &["model/x3d+xml"]), + ("x3f", &["image/x-sigma-x3f"]), ("xaf", &["x-world/x-vrml"]), ("xaml", &["application/xaml+xml"]), ("xap", &["application/x-silverlight-app"]),