diff options
author | hut <hut@lavabit.com> | 2010-03-17 16:19:41 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-03-17 16:19:41 +0100 |
commit | 3a12d7d31e5b49926f4a79066db7e9b03810ff1c (patch) | |
tree | 9319d205bbd82895e362c7a6bb5b10da2bea7725 | |
parent | ab5d3822cb6938956ddcf932b2bbbd237d307385 (diff) | |
download | ranger-3a12d7d31e5b49926f4a79066db7e9b03810ff1c.tar.gz |
use the builtin mimetype support
-rwxr-xr-x | ranger/data/generate.py | 33 | ||||
-rw-r--r-- | ranger/data/mime.dat | 1769 | ||||
-rw-r--r-- | ranger/data/mime.types | 765 | ||||
-rw-r--r-- | ranger/fsobject/fsobject.py | 9 | ||||
-rw-r--r-- | ranger/shared/mimetype.py | 9 |
5 files changed, 15 insertions, 2570 deletions
diff --git a/ranger/data/generate.py b/ranger/data/generate.py deleted file mode 100755 index 195f3559..00000000 --- a/ranger/data/generate.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/python -# coding=utf-8 -# -# Copyright (C) 2009, 2010 Roman Zimbelmann <romanz@lavabit.com> -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -if __name__ == '__main__': - import sys, pickle - - protocol = 0 - table = {} - - for line in open(len(sys.argv) > 1 and sys.argv[1] or "mime.types"): - if len(line) > 3 and line[0] != '#' and ('\t' in line or ' ' in line): - arr = line.split() - name = arr[0] - extensions = arr[1:] - for ext in extensions: - table[ext] = name - - pickle.dump(table, open('mime.dat', 'wb'), protocol) diff --git a/ranger/data/mime.dat b/ranger/data/mime.dat deleted file mode 100644 index 37de71dd..00000000 --- a/ranger/data/mime.dat +++ /dev/null @@ -1,1769 +0,0 @@ -(dp0 -S'mp+' -p1 -S'audio/musepack' -p2 -sS'gf' -p3 -S'application/x-tex-gf' -p4 -sS'mp4' -p5 -S'video/mp4' -p6 -sS'mp2' -p7 -S'audio/mpeg' -p8 -sS'mp3' -p9 -g8 -sS'nwc' -p10 -S'application/x-nwc' -p11 -sS'sct' -p12 -S'text/scriptlet' -p13 -sS'ros' -p14 -S'chemical/x-rosdal' -p15 -sS'mng' -p16 -S'video/x-mng' -p17 -sS'wmz' -p18 -S'application/x-ms-wmz' -p19 -sS'wmx' -p20 -S'video/x-ms-wmx' -p21 -sS'gcd' -p22 -S'text/x-pcs-gcd' -p23 -sS'tr' -p24 -S'application/x-troff' -p25 -sS'ts' -p26 -S'text/texmacs' -p27 -sS'tm' -p28 -g27 -sS'tk' -p29 -S'text/x-tcl' -p30 -sS'wml' -p31 -S'text/vnd.wap.wml' -p32 -sS'wma' -p33 -S'audio/x-ms-wma' -p34 -sS'fchk' -p35 -S'chemical/x-gaussian-checkpoint' -p36 -sS'wmd' -p37 -S'application/x-ms-wmd' -p38 -sS'mpg' -p39 -S'video/mpeg' -p40 -sS'cascii' -p41 -S'chemical/x-cactvs-binary' -p42 -sS'mpe' -p43 -g40 -sS'smi' -p44 -S'application/smil' -p45 -sS'alc' -p46 -S'chemical/x-alchemy' -p47 -sS'mpv' -p48 -S'video/x-matroska' -p49 -sS'mpp' -p50 -g2 -sS'wsc' -p51 -g13 -sS'cml' -p52 -S'chemical/x-cml' -p53 -sS'dif' -p54 -S'video/dv' -p55 -sS'p' -p56 -S'text/x-pascal' -p57 -sS'pbm' -p58 -S'image/x-portable-bitmap' -p59 -sS'div' -p60 -S'video/x-divx' -p61 -sS'dir' -p62 -S'application/x-director' -p63 -sS'htc' -p64 -S'text/x-component' -p65 -sS'hta' -p66 -S'application/hta' -p67 -sS'odp' -p68 -S'application/vnd.oasis.opendocument.presentation' -p69 -sS'htm' -p70 -S'text/html' -p71 -sS'nbp' -p72 -S'application/mathematica' -p73 -sS'odt' -p74 -S'application/vnd.oasis.opendocument.text' -p75 -sS'tex' -p76 -S'text/x-tex' -p77 -sS'odi' -p78 -S'application/vnd.oasis.opendocument.image' -p79 -sS'odm' -p80 -S'application/vnd.oasis.opendocument.text-master' -p81 -sS'oda' -p82 -S'application/oda' -p83 -sS'odb' -p84 -S'application/vnd.oasis.opendocument.database' -p85 -sS'odc' -p86 -S'application/vnd.oasis.opendocument.chart' -p87 -sS'odf' -p88 -S'application/vnd.oasis.opendocument.formula' -p89 -sS'odg' -p90 -S'application/vnd.oasis.opendocument.graphics' -p91 -sS'gl' -p92 -S'video/gl' -p93 -sS'rtx' -p94 -S'text/richtext' -p95 -sS'abw' -p96 -S'application/x-abiword' -p97 -sS'oza' -p98 -S'application/x-oz-application' -p99 -sS'asc' -p100 -S'text/plain' -p101 -sS'm3u' -p102 -S'audio/x-mpegurl' -p103 -sS'ctx' -p104 -S'chemical/x-ctx' -p105 -sS'cbin' -p106 -g42 -sS'rdf' -p107 -S'application/rdf+xml' -p108 -sS'boo' -p109 -S'text/x-boo' -p110 -sS'm3g' -p111 -S'application/m3g' -p112 -sS'maker' -p113 -S'application/x-maker' -p114 -sS'wmv' -p115 -S'video/x-ms-wmv' -p116 -sS'sgl' -p117 -S'application/vnd.stardivision.writer-global' -p118 -sS'brf' -p119 -g101 -sS'txt' -p120 -g101 -sS'wbmp' -p121 -S'image/vnd.wap.wbmp' -p122 -sS'sgf' -p123 -S'application/x-go-sgf' -p124 -sS'zip' -p125 -S'application/zip' -p126 -sS'epsf' -p127 -S'application/postscript' -p128 -sS'chm' -p129 -S'chemical/x-chemdraw' -p130 -sS'msi' -p131 -S'application/x-msi' -p132 -sS'msh' -p133 -S'model/mesh' -p134 -sS'jmz' -p135 -S'application/x-jmol' -p136 -sS'wvx' -p137 -S'video/x-ms-wvx' -p138 -sS'pfb' -p139 -S'application/x-font' -p140 -sS'flv' -p141 -S'video/x-flv' -p142 -sS'flac' -p143 -S'audio/flac' -p144 -sS'wbxml' -p145 -S'application/vnd.wap.wbxml' -p146 -sS'iii' -p147 -S'application/x-iphone' -p148 -sS'me' -p149 -S'application/x-troff-me' -p150 -sS'mm' -p151 -S'application/x-freemind' -p152 -sS'uls' -p153 -S'text/iuls' -p154 -sS'cap' -p155 -S'application/cap' -p156 -sS'cat' -p157 -S'application/vnd.ms-pki.seccat' -p158 -sS'fli' -p159 -S'video/fli' -p160 -sS'jdx' -p161 -S'chemical/x-jcamp-dx' -p162 -sS'ms' -p163 -S'application/x-troff-ms' -p164 -sS'xht' -p165 -S'application/xhtml+xml' -p166 -sS'cac' -p167 -S'chemical/x-cache' -p168 -sS'cab' -p169 -S'application/x-cab' -p170 -sS'deb' -p171 -S'application/x-debian-package' -p172 -sS'eps2' -p173 -g128 -sS'eps3' -p174 -g128 -sS'spx' -p175 -S'audio/ogg' -p176 -sS'ltx' -p177 -g77 -sS'xcf' -p178 -S'application/x-xcf' -p179 -sS'tar' -p180 -S'application/x-tar' -p181 -sS'dxr' -p182 -g63 -sS'taz' -p183 -S'application/x-gtar' -p184 -sS'spl' -p185 -S'application/x-futuresplash' -p186 -sS'spc' -p187 -S'chemical/x-galactic-spc' -p188 -sS'mpc' -p189 -g2 -sS'csm' -p190 -S'chemical/x-csml' -p191 -sS'chrt' -p192 -S'application/x-kchart' -p193 -sS'csh' -p194 -S'text/x-csh' -p195 -sS'gcg' -p196 -S'chemical/x-gcg8-sequence' -p197 -sS'sit' -p198 -S'application/x-stuffit' -p199 -sS'csf' -p200 -S'chemical/x-cache-csf' -p201 -sS'ent' -p202 -S'chemical/x-pdb' -p203 -sS'sid' -p204 -S'audio/prs.sid' -p205 -sS'sik' -p206 -S'application/x-trash' -p207 -sS'xhtml' -p208 -g166 -sS'csv' -p209 -S'text/csv' -p210 -sS'css' -p211 -S'text/css' -p212 -sS'sis' -p213 -S'application/vnd.symbian.install' -p214 -sS'snd' -p215 -S'audio/basic' -p216 -sS'mpega' -p217 -g8 -sS'fb' -p218 -g114 -sS'mesh' -p219 -g134 -sS'divx' -p220 -g61 -sS'fm' -p221 -g114 -sS'man' -p222 -S'application/x-troff-man' -p223 -sS'lha' -p224 -S'application/x-lha' -p225 -sS'gcf' -p226 -S'application/x-graphing-calculator' -p227 -sS'sw' -p228 -S'chemical/x-swissprot' -p229 -sS'sh' -p230 -S'text/x-sh' -p231 -sS'lhs' -p232 -S'text/x-literate-haskell' -p233 -sS'sd' -p234 -S'chemical/x-mdl-sdfile' -p235 -sS'lsf' -p236 -S'video/x-la-asf' -p237 -sS'vmd' -p238 -S'chemical/x-vmd' -p239 -sS'jpeg' -p240 -S'image/jpeg' -p241 -sS'jng' -p242 -S'image/x-jng' -p243 -sS'vms' -p244 -S'chemical/x-vamas-iso14976' -p245 -sS'lsx' -p246 -g237 -sS'pcx' -p247 -S'image/pcx' -p248 -sS'djv' -p249 -S'image/vnd.djvu' -p250 -sS'wrl' -p251 -S'x-world/x-vrml' -p252 -sS'qgs' -p253 -S'application/x-qgis' -p254 -sS'html' -p255 -g71 -sS'fig' -p256 -S'application/x-xfig' -p257 -sS'tsv' -p258 -S'text/tab-separated-values' -p259 -sS'pcf' -p260 -g140 -sS'tsp' -p261 -S'application/dsptype' -p262 -sS'cls' -p263 -g77 -sS'lzx' -p264 -S'application/x-lzx' -p265 -sS'mxu' -p266 -S'video/vnd.mpegurl' -p267 -sS'dat' -p268 -S'application/x-ns-proxy-autoconfig' -p269 -sS'lzh' -p270 -S'application/x-lzh' -p271 -sS'cer' -p272 -S'chemical/x-cerius' -p273 -sS'hqx' -p274 -S'application/mac-binhex40' -p275 -sS'kpr' -p276 -S'application/x-kpresenter' -p277 -sS'kpt' -p278 -g277 -sS'xlb' -p279 -S'application/vnd.ms-excel' -p280 -sS'h' -p281 -S'text/x-chdr' -p282 -sS'xlt' -p283 -g280 -sS'xls' -p284 -g280 -sS'atomcat' -p285 -S'application/atomcat+xml' -p286 -sS'mdb' -p287 -S'application/msaccess' -p288 -sS'gtar' -p289 -g184 -sS'ez' -p290 -S'application/andrew-inset' -p291 -sS'es' -p292 -S'application/ecmascript' -p293 -sS'vcd' -p294 -S'application/x-cdlink' -p295 -sS'vcf' -p296 -S'text/x-vcard' -p297 -sS'rd' -p298 -S'chemical/x-mdl-rdfile' -p299 -sS'vcs' -p300 -S'text/x-vcalendar' -p301 -sS'ra' -p302 -S'audio/x-realaudio' -p303 -sS'rb' -p304 -S'application/x-ruby' -p305 -sS'rm' -p306 -S'audio/x-pn-realaudio' -p307 -sS'asx' -p308 -S'video/x-ms-asf' -p309 -sS'gnumeric' -p310 -S'application/x-gnumeric' -p311 -sS'mml' -p312 -S'text/mathml' -p313 -sS'asf' -p314 -g309 -sS'mmd' -p315 -S'chemical/x-macromodel-input' -p316 -sS'mmf' -p317 -S'application/vnd.smaf' -p318 -sS'aso' -p319 -S'chemical/x-ncbi-asn1-binary' -p320 -sS'asn' -p321 -S'chemical/x-ncbi-asn1-spec' -p322 -sS'cxx' -p323 -S'text/x-c++src' -p324 -sS'xpm' -p325 -S'image/x-xpixmap' -p326 -sS'midi' -p327 -S'audio/midi' -p328 -sS'c3d' -p329 -S'chemical/x-chem3d' -p330 -sS'isp' -p331 -S'application/x-internet-signup' -p332 -sS'swfl' -p333 -S'application/x-shockwave-flash' -p334 -sS'ist' -p335 -S'chemical/x-isostar' -p336 -sS'mvb' -p337 -S'chemical/x-mopac-vib' -p338 -sS'iso' -p339 -S'application/x-iso9660-image' -p340 -sS'xul' -p341 -S'application/vnd.mozilla.xul+xml' -p342 -sS'pgn' -p343 -S'application/x-chess-pgn' -p344 -sS'pgm' -p345 -S'image/x-portable-graymap' -p346 -sS'pgp' -p347 -S'application/pgp-signature' -p348 -sS'mkv' -p349 -S'video/mkv' -p350 -sS'gpt' -p351 -S'chemical/x-mopac-graph' -p352 -sS'phtml' -p353 -S'application/x-httpd-php' -p354 -sS'ods' -p355 -S'application/vnd.oasis.opendocument.spreadsheet' -p356 -sS'ogx' -p357 -S'application/ogg' -p358 -sS'wax' -p359 -S'audio/x-ms-wax' -p360 -sS'ogm' -p361 -S'video/ogg' -p362 -sS'pnm' -p363 -S'image/x-portable-anymap' -p364 -sS'cmdf' -p365 -S'chemical/x-cmdf' -p366 -sS'oga' -p367 -g176 -sS'png' -p368 -S'image/png' -p369 -sS'rss' -p370 -S'application/rss+xml' -p371 -sS'std' -p372 -S'application/vnd.sun.xml.draw.template' -p373 -sS'b' -p374 -S'chemical/x-molconn-Z' -p375 -sS'stc' -p376 -S'application/vnd.sun.xml.calc.template' -p377 -sS'stl' -p378 -S'application/vnd.ms-pki.stl' -p379 -sS'ogg' -p380 -g176 -sS'mcif' -p381 -S'chemical/x-mmcif' -p382 -sS'stw' -p383 -S'application/vnd.sun.xml.writer.template' -p384 -sS'torrent' -p385 -S'application/x-bittorrent' -p386 -sS'prf' -p387 -S'application/pics-rules' -p388 -sS'php3p' -p389 -S'application/x-httpd-php3-preprocessed' -p390 -sS'ram' -p391 -g307 -sS'prt' -p392 -S'chemical/x-ncbi-asn1-ascii' -p393 -sS'rar' -p394 -S'application/rar' -p395 -sS'ras' -p396 -S'image/x-cmu-raster' -p397 -sS'anx' -p398 -S'application/annodex' -p399 -sS'7z' -p400 -S'application/x-7z-compressed' -p401 -sS'shtml' -p402 -g71 -sS'lin' -p403 -S'application/bbolin' -p404 -sS'mid' -p405 -g328 -sS'mif' -p406 -S'application/x-mif' -p407 -sS'323' -p408 -S'text/h323' -p409 -sS'istr' -p410 -g336 -sS'csml' -p411 -g191 -sS'ogv' -p412 -g362 -sS'zmt' -p413 -S'chemical/x-mopac-input' -p414 -sS'kar' -p415 -g328 -sS'mpeg' -p416 -g40 -sS'sisx' -p417 -S'x-epoc/x-sisx-app' -p418 -sS'pyo' -p419 -S'application/x-python-code' -p420 -sS'fch' -p421 -g36 -sS'pyc' -p422 -g420 -sS'awb' -p423 -S'audio/amr-wb' -p424 -sS'cc' -p425 -g324 -sS'fbdoc' -p426 -g114 -sS'latex' -p427 -S'application/x-latex' -p428 -sS'exe' -p429 -S'application/x-msdos-program' -p430 -sS'axv' -p431 -S'video/annodex' -p432 -sS'doc' -p433 -S'application/msword' -p434 -sS'wmlsc' -p435 -S'application/vnd.wap.wmlscriptc' -p436 -sS'hh' -p437 -S'text/x-c++hdr' -p438 -sS'axa' -p439 -S'audio/annodex' -p440 -sS'dot' -p441 -g434 -sS'cdf' -p442 -S'application/x-cdf' -p443 -sS'rtf' -p444 -S'application/rtf' -p445 -sS'ctab' -p446 -g42 -sS'cda' -p447 -g443 -sS'text' -p448 -g101 -sS'sdc' -p449 -S'application/vnd.stardivision.calc' -p450 -sS'cdt' -p451 -S'image/x-coreldrawtemplate' -p452 -sS'texi' -p453 -S'application/x-texinfo' -p454 -sS'cdr' -p455 -S'image/x-coreldraw' -p456 -sS'cdx' -p457 -S'chemical/x-cdx' -p458 -sS'cdy' -p459 -S'application/vnd.cinderella' -p460 -sS'xml' -p461 -S'application/xml' -p462 -sS'ksp' -p463 -S'application/x-kspread' -p464 -sS'cache' -p465 -g168 -sS'jar' -p466 -S'application/java-archive' -p467 -sS'jam' -p468 -S'application/x-jam' -p469 -sS'jad' -p470 -S'text/vnd.sun.j2me.app-descriptor' -p471 -sS'ief' -p472 -S'image/ief' -p473 -sS'dl' -p474 -S'video/dl' -p475 -sS'cpio' -p476 -S'application/x-cpio' -p477 -sS'dx' -p478 -g162 -sS'dv' -p479 -g55 -sS'gen' -p480 -S'chemical/x-genbank' -p481 -sS'hin' -p482 -S'chemical/x-hin' -p483 -sS'silo' -p484 -g134 -sS'shp' -p485 -g254 -sS'bat' -p486 -g430 -sS'qt' -p487 -S'video/quicktime' -p488 -sS'crt' -p489 -S'application/x-x509-ca-cert' -p490 -sS'emb' -p491 -S'chemical/x-embl-dl-nucleotide' -p492 -sS'shx' -p493 -g254 -sS'eml' -p494 -S'message/rfc822' -p495 -sS'c++' -p496 -g324 -sS'patch' -p497 -S'text/x-diff' -p498 -sS'bak' -p499 -g207 -sS'crl' -p500 -S'application/x-pkcs7-crl' -p501 -sS'espi' -p502 -g128 -sS'art' -p503 -S'image/x-jg' -p504 -sS'ser' -p505 -S'application/java-serialized-object' -p506 -sS'frame' -p507 -g114 -sS'sti' -p508 -S'application/vnd.sun.xml.impress.template' -p509 -sS'qtl' -p510 -S'application/x-quicktimeplayer' -p511 -sS'movie' -p512 -S'video/x-sgi-movie' -p513 -sS'dll' -p514 -g430 -sS'wm' -p515 -S'video/x-ms-wm' -p516 -sS'wk' -p517 -S'application/x-123' -p518 -sS'js' -p519 -S'application/javascript' -p520 -sS'key' -p521 -S'application/pgp-keys' -p522 -sS'sv4crc' -p523 -S'application/x-sv4crc' -p524 -sS'pcap' -p525 -g156 -sS'wz' -p526 -S'application/x-wingz' -p527 -sS'vrm' -p528 -g252 -sS'c' -p529 -S'text/x-csrc' -p530 -sS'etx' -p531 -S'text/x-setext' -p532 -sS'sty' -p533 -g77 -sS'cod' -p534 -S'application/vnd.rim.cod' -p535 -sS'pdf' -p536 -S'application/pdf' -p537 -sS'com' -p538 -g430 -sS'pdb' -p539 -g203 -sS'xspf' -p540 -S'application/xspf+xml' -p541 -sS'roff' -p542 -g25 -sS'tgz' -p543 -g184 -sS'pot' -p544 -g101 -sS'tgf' -p545 -S'chemical/x-mdl-tgf' -p546 -sS'kwt' -p547 -S'application/x-kword' -p548 -sS'cxf' -p549 -S'chemical/x-cxf' -p550 -sS'sxd' -p551 -S'application/vnd.sun.xml.draw' -p552 -sS'rpm' -p553 -S'application/x-redhat-package-manager' -p554 -sS'cu' -p555 -S'application/cu-seeme' -p556 -sS'jnlp' -p557 -S'application/x-java-jnlp-file' -p558 -sS'ps' -p559 -g128 -sS'mpga' -p560 -g8 -sS'iges' -p561 -S'model/iges' -p562 -sS'py' -p563 -S'text/x-python' -p564 -sS'frm' -p565 -g114 -sS'swf' -p566 -g334 -sS'pk' -p567 -S'application/x-tex-pk' -p568 -sS'pl' -p569 -S'text/x-perl' -p570 -sS'pm' -p571 -g570 -sS'oth' -p572 -S'application/vnd.oasis.opendocument.text-web' -p573 -sS'mcm' -p574 -S'chemical/x-macmolecule' -p575 -sS'lyx' -p576 -S'application/x-lyx' -p577 -sS'gau' -p578 -S'chemical/x-gaussian-input' -p579 -sS'otg' -p580 -S'application/vnd.oasis.opendocument.graphics-template' -p581 -sS'gam' -p582 -S'chemical/x-gamess-input' -p583 -sS'gal' -p584 -S'chemical/x-gaussian-log' -p585 -sS'otp' -p586 -S'application/vnd.oasis.opendocument.presentation-template' -p587 -sS'ots' -p588 -S'application/vnd.oasis.opendocument.spreadsheet-template' -p589 -sS'ott' -p590 -S'application/vnd.oasis.opendocument.text-template' -p591 -sS'mopcrt' -p592 -g414 -sS'hdf' -p593 -S'application/x-hdf' -p594 -sS'atomsrv' -p595 -S'application/atomserv+xml' -p596 -sS'aif' -p597 -S'audio/x-aiff' -p598 -sS'~' -p599 -g207 -sS'svgz' -p600 -S'image/svg+xml' -p601 -sS'cef' -p602 -g550 -sS'wp5' -p603 -S'application/vnd.wordperfect5.1' -p604 -sS'jpe' -p605 -g241 -sS'jpg' -p606 -g241 -sS'sitx' -p607 -g199 -sS'avi' -p608 -S'video/x-msvideo' -p609 -sS'texinfo' -p610 -g454 -sS'shar' -p611 -S'application/x-shar' -p612 -sS'pas' -p613 -g57 -sS'pat' -p614 -S'image/x-coreldrawpattern' -p615 -sS'pac' -p616 -g269 -sS'hxx' -p617 -g438 -sS'3gp' -p618 -S'video/3gpp' -p619 -sS'kin' -p620 -S'chemical/x-kinemage' -p621 -sS'kil' -p622 -S'application/x-killustrator' -p623 -sS'wpd' -p624 -S'application/vnd.wordperfect' -p625 -sS'igs' -p626 -g562 -sS'php' -p627 -g354 -sS'pht' -p628 -g354 -sS'gamin' -p629 -g583 -sS'wmls' -p630 -S'text/vnd.wap.wmlscript' -p631 -sS'eps' -p632 -g128 -sS'gsf' -p633 -g140 -sS'wmlc' -p634 -S'application/vnd.wap.wmlc' -p635 -sS'gsm' -p636 -S'audio/x-gsm' -p637 -sS'hpp' -p638 -g438 -sS'aiff' -p639 -g598 -sS'davmount' -p640 -S'application/davmount+xml' -p641 -sS'aifc' -p642 -g598 -sS'tcl' -p643 -g30 -sS'bcpio' -p644 -S'application/x-bcpio' -p645 -sS'kwd' -p646 -g548 -sS'skt' -p647 -S'application/x-koan' -p648 -sS'skp' -p649 -g648 -sS'skd' -p650 -g648 -sS'rgb' -p651 -S'image/x-rgb' -p652 -sS'cub' -p653 -S'chemical/x-gaussian-cube' -p654 -sS'skm' -p655 -g648 -sS'm4a' -p656 -g8 -sS'bin' -p657 -S'application/octet-stream' -p658 -sS'embl' -p659 -g492 -sS'mop' -p660 -g414 -sS'bib' -p661 -S'text/x-bibtex' -p662 -sS'mov' -p663 -g488 -sS'psd' -p664 -S'image/x-photoshop' -p665 -sS'moo' -p666 -S'chemical/x-mopac-out' -p667 -sS'mol' -p668 -S'chemical/x-mdl-molfile' -p669 -sS'moc' -p670 -S'text/x-moc' -p671 -sS'amr' -p672 -S'audio/amr' -p673 -sS'ustar' -p674 -S'application/x-ustar' -p675 -sS'd' -p676 -S'text/x-dsrc' -p677 -sS't' -p678 -g25 -sS'xsd' -p679 -g462 -sS'gjf' -p680 -g579 -sS'vrml' -p681 -g252 -sS'gjc' -p682 -g579 -sS'xsl' -p683 -g462 -sS'old' -p684 -g207 -sS'vsd' -p685 -S'application/vnd.visio' -p686 -sS'diff' -p687 -g498 -sS'udeb' -p688 -g172 -sS'ico' -p689 -S'image/x-icon' -p690 -sS'scala' -p691 -S'text/x-scala' -p692 -sS'ica' -p693 -S'application/x-ica' -p694 -sS'kml' -p695 -S'application/vnd.google-earth.kml+xml' -p696 -sS'ice' -p697 -S'x-conference/x-cooltalk' -p698 -sS'icz' -p699 -S'text/calendar' -p700 -sS'ics' -p701 -g700 -sS'xtel' -p702 -S'chemical/x-xtel' -p703 -sS'kmz' -p704 -S'application/vnd.google-earth.kmz' -p705 -sS'pls' -p706 -S'audio/x-scpls' -p707 -sS'mmod' -p708 -g316 -sS'java' -p709 -S'text/x-java' -p710 -sS'dcr' -p711 -g63 -sS'src' -p712 -S'application/x-wais-source' -p713 -sS'o' -p714 -S'application/x-object' -p715 -sS'sd2' -p716 -S'audio/x-sd2' -p717 -sS'tiff' -p718 -S'image/tiff' -p719 -sS'xyz' -p720 -S'chemical/x-xyz' -p721 -sS'ppm' -p722 -S'image/x-portable-pixmap' -p723 -sS'pps' -p724 -S'application/vnd.ms-powerpoint' -p725 -sS'bsd' -p726 -S'chemical/x-crossfire' -p727 -sS'ppt' -p728 -g725 -sS'djvu' -p729 -g250 -sS'xpi' -p730 -S'application/x-xpinstall' -p731 -sS'val' -p732 -g320 -sS'wad' -p733 -S'application/x-doom' -p734 -sS'class' -p735 -S'application/java-vm' -p736 -sS'gif' -p737 -S'image/gif' -p738 -sS'smil' -p739 -g45 -sS'wav' -p740 -S'audio/x-wav' -p741 -sS'rhtml' -p742 -S'application/x-httpd-eruby' -p743 -sS'sdw' -p744 -S'application/vnd.stardivision.writer' -p745 -sS'sds' -p746 -S'application/vnd.stardivision.chart' -p747 -sS'hs' -p748 -S'text/x-haskell' -p749 -sS'sdd' -p750 -S'application/vnd.stardivision.impress' -p751 -sS'sdf' -p752 -g235 -sS'sda' -p753 -S'application/vnd.stardivision.draw' -p754 -sS'atom' -p755 -S'application/atom+xml' -p756 -sS'sv4cpio' -p757 -S'application/x-sv4cpio' -p758 -sS'info' -p759 -S'application/x-info' -p760 -sS'cif' -p761 -S'chemical/x-cif' -p762 -sS'dmg' -p763 -S'application/x-apple-diskimage' -p764 -sS'dms' -p765 -S'application/x-dms' -p766 -sS'svg' -p767 -g601 -sS'xwd' -p768 -S'image/x-xwindowdump' -p769 -sS'pfa' -p770 -g140 -sS'sxc' -p771 -S'application/vnd.sun.xml.calc' -p772 -sS'p7r' -p773 -S'application/x-pkcs7-certreqresp' -p774 -sS'sxg' -p775 -S'application/vnd.sun.xml.writer.global' -p776 -sS'ai' -p777 -g128 -sS'sxi' -p778 -S'application/vnd.sun.xml.impress' -p779 -sS'inp' -p780 -g583 -sS'sxm' -p781 -S'application/vnd.sun.xml.math' -p782 -sS'ins' -p783 -g332 -sS'cbr' -p784 -S'application/x-cbr' -p785 -sS'au' -p786 -g216 -sS'sxw' -p787 -S'application/vnd.sun.xml.writer' -p788 -sS'cbz' -p789 -S'application/x-cbz' -p790 -sS'%' -p791 -g207 -sS'nb' -p792 -g73 -sS'nc' -p793 -S'application/x-netcdf' -p794 -sS'book' -p795 -g114 -sS'php4' -p796 -S'application/x-httpd-php4' -p797 -sS'tif' -p798 -g719 -sS'php3' -p799 -S'application/x-httpd-php3' -p800 -sS'mol2' -p801 -S'chemical/x-mol2' -p802 -sS'h++' -p803 -g438 -sS'dvi' -p804 -S'application/x-dvi' -p805 -sS'pcf.Z' -p806 -g140 -sS'rxn' -p807 -S'chemical/x-mdl-rxnfile' -p808 -sS'cpa' -p809 -S'chemical/x-compass' -p810 -sS'bmp' -p811 -S'image/x-ms-bmp' -p812 -sS'xbm' -p813 -S'image/x-xbitmap' -p814 -sS'cpp' -p815 -g324 -sS'cpt' -p816 -S'image/x-corelphotopaint' -p817 -sS'phps' -p818 -S'application/x-httpd-php-source' -p819 -s. \ No newline at end of file diff --git a/ranger/data/mime.types b/ranger/data/mime.types index 20ab8bce..c8fa5243 100644 --- a/ranger/data/mime.types +++ b/ranger/data/mime.types @@ -2,770 +2,19 @@ # # MIME-TYPES and the extensions that represent them # -# This file is part of the "mime-support" package. Please send email (not a -# bug report) to mime-support@packages.debian.org if you would like new types -# and/or extensions to be added. -# -# The reason that all types are managed by the mime-support package instead -# allowing individual packages to install types in much the same way as they -# add entries in to the mailcap file is so these types can be referenced by -# other programs (such as a web server) even if the specific support package -# for that type is not installed. -# -# Users can add their own types if they wish by creating a ".mime.types" -# file in their home directory. Definitions included there will take -# precedence over those listed here. -# -# Note: Compression schemes like "gzip", "bzip", and "compress" are not -# actually "mime-types". They are "encodings" and hence must _not_ have -# entries in this file to map their extensions. The "mime-type" of an -# encoded file refers to the type of data that has been encoded, not the -# type of encoding. +# This file contains additional mimetypes which I think ranger should have +# by default. You can also use ~/.mime.types to add own types. # +# Mimetypes are used for colorschemes and the builtin filetype detection +# to execute files with the right program. +# ############################################################################### - -application/activemessage -application/andrew-inset ez -application/annodex anx -application/applefile -application/atom+xml atom -application/atomcat+xml atomcat -application/atomserv+xml atomsrv -application/atomicmail -application/batch-SMTP -application/beep+xml -application/bbolin lin -application/cals-1840 -application/cap cap pcap -application/commonground -application/cu-seeme cu -application/cybercash -application/davmount+xml davmount -application/dca-rft -application/dec-dx -application/docbook+xml -application/dsptype tsp -application/dvcs -application/ecmascript es -application/edi-consent -application/edi-x12 -application/edifact -application/eshop -application/font-tdpfr -application/futuresplash spl -application/ghostview -application/hta hta -application/http -application/hyperstudio -application/iges -application/index -application/index.cmd -application/index.obj -application/index.response -application/index.vnd -application/iotp -application/ipp -application/isup -application/java-archive jar -application/java-serialized-object ser -application/java-vm class -application/javascript js -application/m3g m3g -application/mac-binhex40 hqx -application/mac-compactpro cpt -application/macwriteii -application/marc -application/mathematica nb nbp -application/ms-tnef -application/msaccess mdb -application/msword doc dot -application/news-message-id -application/news-transmission -application/ocsp-request -application/ocsp-response -application/octet-stream bin -application/oda oda -application/ogg ogx -application/parityfec -application/pdf pdf -application/pgp-encrypted -application/pgp-keys key -application/pgp-signature pgp -application/pics-rules prf -application/pkcs10 -application/pkcs7-mime -application/pkcs7-signature -application/pkix-cert -application/pkix-crl -application/pkixcmp -application/postscript ps ai eps espi epsf eps2 eps3 -application/prs.alvestrand.titrax-sheet -application/prs.cww -application/prs.nprend -application/qsig -application/rar rar -application/rdf+xml rdf -application/remote-printing -application/riscos -application/rss+xml rss -application/rtf rtf -application/sdp -application/set-payment -application/set-payment-initiation -application/set-registration -application/set-registration-initiation -application/sgml -application/sgml-open-catalog -application/sieve -application/slate -application/smil smi smil -application/timestamp-query -application/timestamp-reply -application/vemmi -application/whoispp-query -application/whoispp-response -application/wita -application/x400-bp -application/xhtml+xml xhtml xht -application/xml xml xsl xsd -application/xml-dtd -application/xml-external-parsed-entity -application/xspf+xml xspf -application/zip zip -application/vnd.3M.Post-it-Notes -application/vnd.accpac.simply.aso -application/vnd.accpac.simply.imp -application/vnd.acucobol -application/vnd.aether.imp -application/vnd.anser-web-certificate-issue-initiation -application/vnd.anser-web-funds-transfer-initiation -application/vnd.audiograph -application/vnd.bmi -application/vnd.businessobjects -application/vnd.canon-cpdl -application/vnd.canon-lips -application/vnd.cinderella cdy -application/vnd.claymore -application/vnd.commerce-battelle -application/vnd.commonspace -application/vnd.comsocaller -application/vnd.contact.cmsg -application/vnd.cosmocaller -application/vnd.ctc-posml -application/vnd.cups-postscript -application/vnd.cups-raster -application/vnd.cups-raw -application/vnd.cybank -application/vnd.dna -application/vnd.dpgraph -application/vnd.dxr -application/vnd.ecdis-update -application/vnd.ecowin.chart -application/vnd.ecowin.filerequest -application/vnd.ecowin.fileupdate -application/vnd.ecowin.series -application/vnd.ecowin.seriesrequest -application/vnd.ecowin.seriesupdate -application/vnd.enliven -application/vnd.epson.esf -application/vnd.epson.msf -application/vnd.epson.quickanime -application/vnd.epson.salt -application/vnd.epson.ssf -application/vnd.ericsson.quickcall -application/vnd.eudora.data -application/vnd.fdf -application/vnd.ffsns -application/vnd.flographit -application/vnd.framemaker -application/vnd.fsc.weblaunch -application/vnd.fujitsu.oasys -application/vnd.fujitsu.oasys2 -application/vnd.fujitsu.oasys3 -application/vnd.fujitsu.oasysgp -application/vnd.fujitsu.oasysprs -application/vnd.fujixerox.ddd -application/vnd.fujixerox.docuworks -application/vnd.fujixerox.docuworks.binder -application/vnd.fut-misnet -application/vnd.google-earth.kml+xml kml -application/vnd.google-earth.kmz kmz -application/vnd.grafeq -application/vnd.groove-account -application/vnd.groove-identity-message -application/vnd.groove-injector -application/vnd.groove-tool-message -application/vnd.groove-tool-template -application/vnd.groove-vcard -application/vnd.hhe.lesson-player -application/vnd.hp-HPGL -application/vnd.hp-PCL -application/vnd.hp-PCLXL -application/vnd.hp-hpid -application/vnd.hp-hps -application/vnd.httphone -application/vnd.hzn-3d-crossword -application/vnd.ibm.MiniPay -application/vnd.ibm.afplinedata -application/vnd.ibm.modcap -application/vnd.informix-visionary -application/vnd.intercon.formnet -application/vnd.intertrust.digibox -application/vnd.intertrust.nncp -application/vnd.intu.qbo -application/vnd.intu.qfx -application/vnd.irepository.package+xml -application/vnd.is-xpr -application/vnd.japannet-directory-service -application/vnd.japannet-jpnstore-wakeup -application/vnd.japannet-payment-wakeup -application/vnd.japannet-registration -application/vnd.japannet-registration-wakeup -application/vnd.japannet-setstore-wakeup -application/vnd.japannet-verification -application/vnd.japannet-verification-wakeup -application/vnd.koan -application/vnd.lotus-1-2-3 -application/vnd.lotus-approach -application/vnd.lotus-freelance -application/vnd.lotus-notes -application/vnd.lotus-organizer -application/vnd.lotus-screencam -application/vnd.lotus-wordpro -application/vnd.mcd -application/vnd.mediastation.cdkey -application/vnd.meridian-slingshot -application/vnd.mif -application/vnd.minisoft-hp3000-save -application/vnd.mitsubishi.misty-guard.trustweb -application/vnd.mobius.daf -application/vnd.mobius.dis -application/vnd.mobius.msl -application/vnd.mobius.plc -application/vnd.mobius.txf -application/vnd.motorola.flexsuite -application/vnd.motorola.flexsuite.adsi -application/vnd.motorola.flexsuite.fis -application/vnd.motorola.flexsuite.gotap -application/vnd.motorola.flexsuite.kmr -application/vnd.motorola.flexsuite.ttc -application/vnd.motorola.flexsuite.wem -application/vnd.mozilla.xul+xml xul -application/vnd.ms-artgalry -application/vnd.ms-asf -application/vnd.ms-excel xls xlb xlt -application/vnd.ms-lrm -application/vnd.ms-pki.seccat cat -application/vnd.ms-pki.stl stl -application/vnd.ms-powerpoint ppt pps -application/vnd.ms-project -application/vnd.ms-tnef -application/vnd.ms-works -application/vnd.mseq -application/vnd.msign -application/vnd.music-niff -application/vnd.musician -application/vnd.netfpx -application/vnd.noblenet-directory -application/vnd.noblenet-sealer -application/vnd.noblenet-web -application/vnd.novadigm.EDM -application/vnd.novadigm.EDX -application/vnd.novadigm.EXT -application/vnd.oasis.opendocument.chart odc -application/vnd.oasis.opendocument.database odb -application/vnd.oasis.opendocument.formula odf -application/vnd.oasis.opendocument.graphics odg -application/vnd.oasis.opendocument.graphics-template otg -application/vnd.oasis.opendocument.image odi -application/vnd.oasis.opendocument.presentation odp -application/vnd.oasis.opendocument.presentation-template otp -application/vnd.oasis.opendocument.spreadsheet ods -application/vnd.oasis.opendocument.spreadsheet-template ots -application/vnd.oasis.opendocument.text odt -application/vnd.oasis.opendocument.text-master odm -application/vnd.oasis.opendocument.text-template ott -application/vnd.oasis.opendocument.text-web oth -application/vnd.osa.netdeploy -application/vnd.palm -application/vnd.pg.format -application/vnd.pg.osasli -application/vnd.powerbuilder6 -application/vnd.powerbuilder6-s -application/vnd.powerbuilder7 -application/vnd.powerbuilder7-s -application/vnd.powerbuilder75 -application/vnd.powerbuilder75-s -application/vnd.previewsystems.box -application/vnd.publishare-delta-tree -application/vnd.pvi.ptid1 -application/vnd.pwg-xhtml-print+xml -application/vnd.rapid -application/vnd.rim.cod cod -application/vnd.s3sms -application/vnd.seemail -application/vnd.shana.informed.formdata -application/vnd.shana.informed.formtemplate -application/vnd.shana.informed.interchange -application/vnd.shana.informed.package -application/vnd.smaf mmf -application/vnd.sss-cod -application/vnd.sss-dtf -application/vnd.sss-ntf -application/vnd.stardivision.calc sdc -application/vnd.stardivision.chart sds -application/vnd.stardivision.draw sda -application/vnd.stardivision.impress sdd -application/vnd.stardivision.math sdf -application/vnd.stardivision.writer sdw -application/vnd.stardivision.writer-global sgl -application/vnd.street-stream -application/vnd.sun.xml.calc sxc -application/vnd.sun.xml.calc.template stc -application/vnd.sun.xml.draw sxd -application/vnd.sun.xml.draw.template std -application/vnd.sun.xml.impress sxi -application/vnd.sun.xml.impress.template sti -application/vnd.sun.xml.math sxm -application/vnd.sun.xml.writer sxw -application/vnd.sun.xml.writer.global sxg -application/vnd.sun.xml.writer.template stw -application/vnd.svd -application/vnd.swiftview-ics -application/vnd.symbian.install sis -application/vnd.triscape.mxs -application/vnd.trueapp -application/vnd.truedoc -application/vnd.tve-trigger -application/vnd.ufdl -application/vnd.uplanet.alert -application/vnd.uplanet.alert-wbxml -application/vnd.uplanet.bearer-choice -application/vnd.uplanet.bearer-choice-wbxml -application/vnd.uplanet.cacheop -application/vnd.uplanet.cacheop-wbxml -application/vnd.uplanet.channel -application/vnd.uplanet.channel-wbxml -application/vnd.uplanet.list -application/vnd.uplanet.list-wbxml -application/vnd.uplanet.listcmd -application/vnd.uplanet.listcmd-wbxml -application/vnd.uplanet.signal -application/vnd.vcx -application/vnd.vectorworks -application/vnd.vidsoft.vidconference -application/vnd.visio vsd -application/vnd.vividence.scriptfile -application/vnd.wap.sic -application/vnd.wap.slc -application/vnd.wap.wbxml wbxml -application/vnd.wap.wmlc wmlc -application/vnd.wap.wmlscriptc wmlsc -application/vnd.webturbo -application/vnd.wordperfect wpd -application/vnd.wordperfect5.1 wp5 -application/vnd.wrq-hp3000-labelled -application/vnd.wt.stf -application/vnd.xara -application/vnd.xfdl -application/vnd.yellowriver-custom-menu -application/x-123 wk -application/x-7z-compressed 7z -application/x-abiword abw -application/x-apple-diskimage dmg -application/x-bcpio bcpio -application/x-bittorrent torrent -application/x-cab cab -application/x-cbr cbr -application/x-cbz cbz -application/x-cdf cdf cda -application/x-cdlink vcd -application/x-chess-pgn pgn -application/x-core -application/x-cpio cpio -application/x-csh csh -application/x-debian-package deb udeb -application/x-director dcr dir dxr -application/x-dms dms -application/x-doom wad -application/x-dvi dvi -application/x-httpd-eruby rhtml -application/x-executable -application/x-font pfa pfb gsf pcf pcf.Z -application/x-freemind mm -application/x-futuresplash spl -application/x-gnumeric gnumeric -application/x-go-sgf sgf -application/x-graphing-calculator gcf -application/x-gtar gtar tgz taz -application/x-hdf hdf -application/x-httpd-php phtml pht php -application/x-httpd-php-source phps -application/x-httpd-php3 php3 -application/x-httpd-php3-preprocessed php3p -application/x-httpd-php4 php4 -application/x-ica ica -application/x-info info -application/x-internet-signup ins isp -application/x-iphone iii -application/x-iso9660-image iso -application/x-jam jam -application/x-java-applet -application/x-java-bean -application/x-java-jnlp-file jnlp -application/x-jmol jmz -application/x-kchart chrt -application/x-kdelnk -application/x-killustrator kil -application/x-koan skp skd skt skm -application/x-kpresenter kpr kpt -application/x-kspread ksp -application/x-kword kwd kwt -application/x-latex latex -application/x-lha lha -application/x-lyx lyx -application/x-lzh lzh -application/x-lzx lzx -application/x-maker frm maker frame fm fb book fbdoc -application/x-mif mif -application/x-ms-wmd wmd -application/x-ms-wmz wmz -application/x-msdos-program com exe bat dll -application/x-msi msi -application/x-netcdf nc -application/x-ns-proxy-autoconfig pac dat -application/x-nwc nwc -application/x-object o -application/x-oz-application oza -application/x-pkcs7-certreqresp p7r -application/x-pkcs7-crl crl -application/x-python-code pyc pyo -application/x-qgis qgs shp shx -application/x-quicktimeplayer qtl -application/x-redhat-package-manager rpm -application/x-ruby rb -application/x-rx -application/x-sh sh -application/x-shar shar -application/x-shellscript -application/x-shockwave-flash swf swfl -application/x-stuffit sit sitx -application/x-sv4cpio sv4cpio -application/x-sv4crc sv4crc -application/x-tar tar -application/x-tcl tcl -application/x-tex-gf gf -application/x-tex-pk pk -application/x-texinfo texinfo texi -application/x-trash ~ % bak old sik -application/x-troff t tr roff -application/x-troff-man man -application/x-troff-me me -application/x-troff-ms ms -application/x-ustar ustar -application/x-videolan -application/x-wais-source src -application/x-wingz wz -application/x-x509-ca-cert crt -application/x-xcf xcf -application/x-xfig fig -application/x-xpinstall xpi - -audio/32kadpcm -audio/3gpp -audio/amr amr -audio/amr-wb awb -audio/amr amr -audio/amr-wb awb -audio/annodex axa -audio/basic au snd audio/flac flac -audio/g.722.1 -audio/l16 -audio/midi mid midi kar -audio/mp4a-latm -audio/mpa-robust -audio/mpeg mpga mpega mp2 mp3 m4a -audio/mpegurl m3u audio/musepack mpc mpp mp+ audio/ogg oga ogg spx -audio/parityfec -audio/prs.sid sid -audio/telephone-event -audio/tone -audio/vnd.cisco.nse -audio/vnd.cns.anp1 -audio/vnd.cns.inf1 -audio/vnd.digital-winds -audio/vnd.everad.plj -audio/vnd.lucent.voice -audio/vnd.nortel.vbk -audio/vnd.nuera.ecelp4800 -audio/vnd.nuera.ecelp7470 -audio/vnd.nuera.ecelp9600 -audio/vnd.octel.sbc -audio/vnd.qcelp -audio/vnd.rhetorex.32kadpcm -audio/vnd.vmx.cvsd -audio/x-aiff aif aiff aifc -audio/x-gsm gsm -audio/x-mpegurl m3u -audio/x-ms-wma wma -audio/x-ms-wax wax -audio/x-pn-realaudio-plugin -audio/x-pn-realaudio ra rm ram -audio/x-realaudio ra -audio/x-scpls pls -audio/x-sd2 sd2 -audio/x-wav wav - -chemical/x-alchemy alc -chemical/x-cache cac cache -chemical/x-cache-csf csf -chemical/x-cactvs-binary cbin cascii ctab -chemical/x-cdx cdx -chemical/x-cerius cer -chemical/x-chem3d c3d -chemical/x-chemdraw chm -chemical/x-cif cif -chemical/x-cmdf cmdf -chemical/x-cml cml -chemical/x-compass cpa -chemical/x-crossfire bsd -chemical/x-csml csml csm -chemical/x-ctx ctx -chemical/x-cxf cxf cef -#chemical/x-daylight-smiles smi -chemical/x-embl-dl-nucleotide emb embl -chemical/x-galactic-spc spc -chemical/x-gamess-input inp gam gamin -chemical/x-gaussian-checkpoint fch fchk -chemical/x-gaussian-cube cub -chemical/x-gaussian-input gau gjc gjf -chemical/x-gaussian-log gal -chemical/x-gcg8-sequence gcg -chemical/x-genbank gen -chemical/x-hin hin -chemical/x-isostar istr ist -chemical/x-jcamp-dx jdx dx -chemical/x-kinemage kin -chemical/x-macmolecule mcm -chemical/x-macromodel-input mmd mmod -chemical/x-mdl-molfile mol -chemical/x-mdl-rdfile rd -chemical/x-mdl-rxnfile rxn -chemical/x-mdl-sdfile sd sdf -chemical/x-mdl-tgf tgf -#chemical/x-mif mif -chemical/x-mmcif mcif -chemical/x-mol2 mol2 -chemical/x-molconn-Z b -chemical/x-mopac-graph gpt -chemical/x-mopac-input mop mopcrt zmt -chemical/x-mopac-out moo -chemical/x-mopac-vib mvb -chemical/x-ncbi-asn1 asn -chemical/x-ncbi-asn1-ascii prt ent -chemical/x-ncbi-asn1-binary val aso -chemical/x-ncbi-asn1-spec asn -chemical/x-pdb pdb ent -chemical/x-rosdal ros -chemical/x-swissprot sw -chemical/x-vamas-iso14976 vms -chemical/x-vmd vmd -chemical/x-xtel xtel -chemical/x-xyz xyz - -image/cgm -image/g3fax -image/gif gif -image/ief ief -image/jpeg jpeg jpg jpe -image/naplps -image/pcx pcx -image/png png -image/prs.btif -image/prs.pti -image/svg+xml svg svgz -image/tiff tiff tif -image/vnd.cns.inf2 -image/vnd.djvu djvu djv -image/vnd.dwg -image/vnd.dxf -image/vnd.fastbidsheet -image/vnd.fpx -image/vnd.fst -image/vnd.fujixerox.edmics-mmr -image/vnd.fujixerox.edmics-rlc -image/vnd.mix -image/vnd.net-fpx -image/vnd.svf -image/vnd.wap.wbmp wbmp -image/vnd.xiff -image/x-cmu-raster ras -image/x-coreldraw cdr -image/x-coreldrawpattern pat -image/x-coreldrawtemplate cdt -image/x-corelphotopaint cpt -image/x-icon ico -image/x-jg art -image/x-jng jng -image/x-ms-bmp bmp -image/x-photoshop psd -image/x-portable-anymap pnm -image/x-portable-bitmap pbm -image/x-portable-graymap pgm -image/x-portable-pixmap ppm -image/x-rgb rgb -image/x-xbitmap xbm -image/x-xpixmap xpm -image/x-xwindowdump xwd -inode/chardevice -inode/blockdevice -inode/directory-locked -inode/directory -inode/fifo -inode/socket - -message/delivery-status -message/disposition-notification -message/external-body -message/http -message/s-http -message/news -message/partial -message/rfc822 eml - -model/iges igs iges -model/mesh msh mesh silo -model/vnd.dwf -model/vnd.flatland.3dml -model/vnd.gdl -model/vnd.gs-gdl -model/vnd.gtw -model/vnd.mts -model/vnd.vtu -model/vrml wrl vrml - -multipart/alternative -multipart/appledouble -multipart/byteranges -multipart/digest -multipart/encrypted -multipart/form-data -multipart/header-set -multipart/mixed -multipart/parallel -multipart/related -multipart/report -multipart/signed -multipart/voice-message - -text/calendar ics icz -text/css css -text/csv csv -text/directory -text/english -text/enriched -text/h323 323 -text/html html htm shtml -text/iuls uls -text/mathml mml -text/parityfec -text/plain asc txt text pot brf -text/prs.lines.tag -text/rfc822-headers -text/richtext rtx -text/rtf -text/scriptlet sct wsc -text/t140 -text/texmacs tm ts -text/tab-separated-values tsv -text/uri-list -text/vnd.abc -text/vnd.curl -text/vnd.DMClientScript -text/vnd.flatland.3dml -text/vnd.fly -text/vnd.fmi.flexstor -text/vnd.in3d.3dml -text/vnd.in3d.spot -text/vnd.IPTC.NewsML -text/vnd.IPTC.NITF -text/vnd.latex-z -text/vnd.motorola.reflex -text/vnd.ms-mediapackage -text/vnd.sun.j2me.app-descriptor jad -text/vnd.wap.si -text/vnd.wap.sl -text/vnd.wap.wml wml -text/vnd.wap.wmlscript wmls -text/x-bibtex bib -text/x-boo boo -text/x-c++hdr h++ hpp hxx hh -text/x-c++src c++ cpp cxx cc -text/x-chdr h -text/x-component htc -text/x-crontab -text/x-csh csh -text/x-csrc c -text/x-dsrc d -text/x-diff diff patch -text/x-haskell hs -text/x-java java -text/x-literate-haskell lhs -text/x-makefile -text/x-moc moc -text/x-pascal p pas -text/x-pcs-gcd gcd -text/x-perl pl pm -text/x-python py -text/x-scala scala -text/x-server-parsed-html -text/x-setext etx -text/x-sh sh -text/x-tcl tcl tk -text/x-tex tex ltx sty cls -text/x-vcalendar vcs -text/x-vcard vcf - -video/3gpp 3gp -video/annodex axv -video/dl dl -video/dv dif dv -video/fli fli -video/gl gl -video/mpeg mpeg mpg mpe video/mkv mkv -video/mp4 mp4 -video/quicktime qt mov -video/mp4v-es +video/flash flv video/ogg ogv ogm -video/parityfec -video/pointer -video/vnd.fvt -video/vnd.motorola.video -video/vnd.motorola.videop -video/vnd.mpegurl mxu -video/vnd.mts -video/vnd.nokia.interleaved-multimedia -video/vnd.vivo -video/x-flv flv -video/x-la-asf lsf lsx -video/x-mng mng -video/x-ms-asf asf asx -video/x-ms-wm wm -video/x-ms-wmv wmv -video/x-ms-wmx wmx -video/x-ms-wvx wvx -video/x-msvideo avi -video/x-sgi-movie movie -video/x-matroska mpv -video/x-divx div divx - -x-conference/x-cooltalk ice - -x-epoc/x-sisx-app sisx -x-world/x-vrml vrm vrml wrl +video/divx div divx diff --git a/ranger/fsobject/fsobject.py b/ranger/fsobject/fsobject.py index 49936c3f..92c8b596 100644 --- a/ranger/fsobject/fsobject.py +++ b/ranger/fsobject/fsobject.py @@ -119,16 +119,17 @@ class FileSystemObject(MimeTypeAware, FileManagerAware): def set_mimetype(self): """assign attributes such as self.video according to the mimetype""" - try: - self.mimetype = self.mimetypes[self.extension] - except KeyError: + self.mimetype = self.mimetypes.guess_type(self.basename, False)[0] + if self.mimetype is None: self.mimetype = '' self.video = self.mimetype.startswith('video') self.image = self.mimetype.startswith('image') self.audio = self.mimetype.startswith('audio') self.media = self.video or self.image or self.audio - self.document = self.mimetype.startswith('text') or (self.extension in DOCUMENT_EXTENSIONS) or (self.basename in DOCUMENT_BASENAMES) + self.document = self.mimetype.startswith('text') \ + or (self.extension in DOCUMENT_EXTENSIONS) \ + or (self.basename in DOCUMENT_BASENAMES) self.container = self.extension in CONTAINER_EXTENSIONS keys = ('video', 'audio', 'image', 'media', 'document', 'container') diff --git a/ranger/shared/mimetype.py b/ranger/shared/mimetype.py index 49af9632..1a7f79a0 100644 --- a/ranger/shared/mimetype.py +++ b/ranger/shared/mimetype.py @@ -14,15 +14,12 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. from ranger import relpath +import mimetypes class MimeTypeAware(object): mimetypes = {} __initialized = False def __init__(self): if not MimeTypeAware.__initialized: + MimeTypeAware.mimetypes = mimetypes.MimeTypes() + MimeTypeAware.mimetypes.read(relpath('data/mime.types')) MimeTypeAware.__initialized = True - import os, sys, pickle - MimeTypeAware.mimetypes.clear() - - f = open(relpath('data/mime.dat'), 'rb') - MimeTypeAware.mimetypes.update(pickle.load(f)) - f.close() |