├── LICENSE ├── inst ├── extdat │ ├── pass-through │ │ ├── test.txt │ │ ├── test.bin │ │ ├── test.sh │ │ ├── test.au │ │ ├── test.bmp │ │ ├── test.emf │ │ ├── test.fli │ │ ├── test.gif │ │ ├── test.ico │ │ ├── test.jpg │ │ ├── test.mp3 │ │ ├── test.odt │ │ ├── test.ogg │ │ ├── test.pcx │ │ ├── test.pdf │ │ ├── test.png │ │ ├── test.pnm │ │ ├── test.ppm │ │ ├── test.ppt │ │ ├── test.psd │ │ ├── test.tga │ │ ├── test.wav │ │ ├── test.wmf │ │ ├── test.xcf │ │ ├── test.zip │ │ ├── actions.csv │ │ ├── actions.txt │ │ ├── actions.xlsx │ │ ├── test.pl │ │ ├── test.tar.gz │ │ ├── test.txt.gz │ │ ├── test_word.docm │ │ ├── test_word.docx │ │ ├── test_excel.xlsm │ │ ├── test_excel.xlsx │ │ ├── test_excel_2000.xls │ │ ├── test_nocompress.tif │ │ ├── test_word_2000.doc │ │ ├── test_powerpoint.pptm │ │ ├── test_powerpoint.pptx │ │ ├── test_word_6.0_95.doc │ │ ├── test_128_44_jstereo.mp3 │ │ ├── test.dtd │ │ ├── test.xml │ │ ├── test_excel_spreadsheet.xml │ │ ├── test.rtf │ │ ├── test_excel_web_archive.mht │ │ ├── test.ps │ │ ├── test.eps │ │ ├── test.tar │ │ ├── test.py │ │ └── test.xpm │ └── no-guess │ │ └── csv.docx └── tinytest │ └── test_wand.R ├── R ├── sysdata.rda ├── util.R ├── aaa.r ├── wand-package.R ├── check-office.R ├── guess-content-type.R └── get-content-type.R ├── .gitignore ├── .travis.yml ├── tests └── tinytest.R ├── CRAN-RELEASE ├── NAMESPACE ├── .Rbuildignore ├── cran-comments.md ├── wand.Rproj ├── NEWS.md ├── man ├── simplemagic_mime_db.Rd ├── wand.Rd ├── guess_content_type.Rd └── get_content_type.Rd ├── DESCRIPTION ├── tools ├── build-ext-db.R └── orig-db.csv ├── appveyor.yml ├── README.Rmd ├── .vscode └── c_cpp_properties.json ├── .build.yml └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | YEAR: 2019 2 | COPYRIGHT HOLDER: Bob Rudis 3 | -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.txt: -------------------------------------------------------------------------------- 1 | This is a plain text file 2 | -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.bin: -------------------------------------------------------------------------------- 1 | 0100644000175000 2 | -------------------------------------------------------------------------------- /R/sysdata.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/R/sysdata.rda -------------------------------------------------------------------------------- /inst/extdat/no-guess/csv.docx: -------------------------------------------------------------------------------- 1 | Kid Name,Weight,Age 2 | Nakshatra,12,1.5 3 | Titas,16,6 4 | -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "this is a test bash script" 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .Rproj.user 2 | .Rhistory 3 | .RData 4 | .Rproj 5 | src/*.o 6 | src/*.so 7 | src/*.dll 8 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: R 2 | cache: packages 3 | 4 | after_success: 5 | - Rscript -e 'covr::codecov()' -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.au: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test.au -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test.bmp -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.emf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test.emf -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.fli: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test.fli -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test.gif -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test.ico -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test.jpg -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test.mp3 -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.odt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test.odt -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test.ogg -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.pcx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test.pcx -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test.pdf -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test.png -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.pnm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test.pnm -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.ppm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test.ppm -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test.ppt -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test.psd -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test.tga -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test.wav -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.wmf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test.wmf -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test.xcf -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test.zip -------------------------------------------------------------------------------- /inst/extdat/pass-through/actions.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/actions.csv -------------------------------------------------------------------------------- /inst/extdat/pass-through/actions.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/actions.txt -------------------------------------------------------------------------------- /inst/extdat/pass-through/actions.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/actions.xlsx -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | use strict; 4 | 5 | print "this is a test perl script\n"; 6 | -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test.tar.gz -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.txt.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test.txt.gz -------------------------------------------------------------------------------- /inst/extdat/pass-through/test_word.docm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test_word.docm -------------------------------------------------------------------------------- /inst/extdat/pass-through/test_word.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test_word.docx -------------------------------------------------------------------------------- /tests/tinytest.R: -------------------------------------------------------------------------------- 1 | 2 | if ( requireNamespace("tinytest", quietly=TRUE) ){ 3 | tinytest::test_package("wand") 4 | } 5 | 6 | -------------------------------------------------------------------------------- /inst/extdat/pass-through/test_excel.xlsm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test_excel.xlsm -------------------------------------------------------------------------------- /inst/extdat/pass-through/test_excel.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test_excel.xlsx -------------------------------------------------------------------------------- /inst/extdat/pass-through/test_excel_2000.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test_excel_2000.xls -------------------------------------------------------------------------------- /inst/extdat/pass-through/test_nocompress.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test_nocompress.tif -------------------------------------------------------------------------------- /inst/extdat/pass-through/test_word_2000.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test_word_2000.doc -------------------------------------------------------------------------------- /inst/extdat/pass-through/test_powerpoint.pptm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test_powerpoint.pptm -------------------------------------------------------------------------------- /inst/extdat/pass-through/test_powerpoint.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test_powerpoint.pptx -------------------------------------------------------------------------------- /inst/extdat/pass-through/test_word_6.0_95.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test_word_6.0_95.doc -------------------------------------------------------------------------------- /inst/extdat/pass-through/test_128_44_jstereo.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hrbrmstr/wand/HEAD/inst/extdat/pass-through/test_128_44_jstereo.mp3 -------------------------------------------------------------------------------- /CRAN-RELEASE: -------------------------------------------------------------------------------- 1 | This package was submitted to CRAN on 2019-07-08. 2 | Once it is accepted, delete this file and tag the release (commit d1ad04fe43). 3 | -------------------------------------------------------------------------------- /NAMESPACE: -------------------------------------------------------------------------------- 1 | # Generated by roxygen2: do not edit by hand 2 | 3 | export(get_content_type) 4 | export(guess_content_type) 5 | importFrom(tools,file_ext) 6 | -------------------------------------------------------------------------------- /.Rbuildignore: -------------------------------------------------------------------------------- 1 | ^.*\.Rproj$ 2 | ^\.Rproj\.user$ 3 | ^\.travis\.yml$ 4 | ^README\.Rmd$ 5 | ^README\.*html$ 6 | ^NOTES\.*Rmd$ 7 | ^README\.md$ 8 | ^NOTES\.*html$ 9 | ^tools$ 10 | ^cran-comments\.md$ 11 | ^builder$ 12 | ^\.vscode$ 13 | ^CRAN-RELEASE$ 14 | ^appveyor\.yml$ 15 | ^tools$ 16 | ^\.build\.yml$ 17 | -------------------------------------------------------------------------------- /R/util.R: -------------------------------------------------------------------------------- 1 | seq_in <- function(source_vector, pattern_vector) { 2 | 3 | which( 4 | Reduce( 5 | '+', 6 | lapply( 7 | seq_along(y <- lapply(pattern_vector, '==', source_vector)), 8 | function(x) { 9 | y[[x]][x:(length(source_vector) - length(pattern_vector) + x)] 10 | } 11 | ) 12 | ) == length(pattern_vector) 13 | ) 14 | 15 | } 16 | -------------------------------------------------------------------------------- /cran-comments.md: -------------------------------------------------------------------------------- 1 | ## Test environments 2 | * local OS X install, R 3.6.0 3 | * ubuntu 14.04 (on travis-ci), R 3.6.0 4 | * win-builder (devel and release) 5 | 6 | ## R CMD check results 7 | 8 | 0 errors | 0 warnings | 1 note 9 | 10 | * This is a maintenance release. 11 | 12 | --- 13 | 14 | Removed README per Uwe 15 | Update per Dr Ripley note re: Solaris 16 | Removed legitimate tests causing previous CRAN update submission issue. 17 | -------------------------------------------------------------------------------- /wand.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 2 10 | Encoding: UTF-8 11 | 12 | RnwWeave: Sweave 13 | LaTeX: pdfLaTeX 14 | 15 | StripTrailingWhitespace: Yes 16 | 17 | BuildType: Package 18 | PackageUseDevtools: Yes 19 | PackageInstallArgs: --no-multiarch --with-keep.source 20 | PackageBuildArgs: --resave-data 21 | PackageRoxygenize: rd,collate,namespace 22 | -------------------------------------------------------------------------------- /R/aaa.r: -------------------------------------------------------------------------------- 1 | #' @name simplemagic_mime_db 2 | #' @title File extension-to-MIME mapping data frame 3 | #' @description built from the files found in the References 4 | #' @docType data 5 | #' @keywords datasets 6 | #' @references 7 | #' - 8 | #' - 9 | #' - 10 | #' - 11 | #' @note Last updated 2019-07-27. 12 | NULL -------------------------------------------------------------------------------- /NEWS.md: -------------------------------------------------------------------------------- 1 | # 0.6.0 2 | - new `guess` logical parameter to `get_content_type()` to control 3 | whether it is used as a last resort passthrough (addresses #4) 4 | - updated external guess database 5 | 6 | # 0.5.0 7 | - {tidytest} 8 | - CRAN release 9 | 10 | # 0.4.0 11 | - Enhanced jpeg detection 12 | - Added distinction between pax and tar 13 | - Added lzip detection 14 | - Added 7-zip detection 15 | - Added wasm file detection 16 | - Added pcap and pcapng detection 17 | - Added avro detection 18 | - Added parquet detection 19 | 20 | # 0.3.0 21 | * Dropped libmagic 22 | 23 | # 0.2.0 24 | * Works on Windows 25 | 26 | # 0.1.0 27 | * Initial release 28 | -------------------------------------------------------------------------------- /man/simplemagic_mime_db.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/aaa.r 3 | \docType{data} 4 | \name{simplemagic_mime_db} 5 | \alias{simplemagic_mime_db} 6 | \title{File extension-to-MIME mapping data frame} 7 | \description{ 8 | built from the files found in the References 9 | } 10 | \note{ 11 | Last updated 2019-07-27. 12 | } 13 | \references{ 14 | - 15 | - 16 | - 17 | - 18 | } 19 | \keyword{datasets} 20 | -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.dtd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: wand 2 | Type: Package 3 | Title: Retrieve Magic Attributes from Files and 4 | Directories 5 | Version: 0.6.0 6 | Date: 2019-07-27 7 | Authors@R: c( person("Bob", "Rudis", email = 8 | "bob@rud.is", role = c("aut", "cre"), comment = 9 | c(ORCID = "0000-0001-5670-2640")) ) 10 | Description: MIME types are shorthand descriptors for 11 | file contents and can be determined from "magic" 12 | bytes in file headers, file contents or intuited 13 | from file extensions. Tools are provided to 14 | perform curated "magic" tests as well as mapping 15 | MIME types from a database of over 1,800 16 | extension mappings. 17 | URL: https://gitlab.com/hrbrmstr/wand 18 | BugReports: https://gitlab.com/hrbrmstr/wand/issues 19 | Encoding: UTF-8 20 | License: MIT + file LICENSE 21 | Suggests: covr, tinytest 22 | Imports: tools 23 | Depends: R (>= 3.2.0) 24 | RoxygenNote: 6.1.1 25 | -------------------------------------------------------------------------------- /tools/build-ext-db.R: -------------------------------------------------------------------------------- 1 | library(tidyverse) 2 | 3 | a <- jsonlite::fromJSON("https://s-randomfiles.s3.amazonaws.com/mime/allMimeTypes.json") 4 | b <- jsonlite::fromJSON("https://cdn.jsdelivr.net/gh/jshttp/mime-db@master/db.json") 5 | 6 | aa <- map(a, compact) 7 | aa <- keep(aa, lengths(aa)>0) 8 | 9 | bb <- keep(b, ~"extensions" %in% names(.x)) 10 | 11 | map_df(names(aa), ~{ 12 | tibble( 13 | extension = aa[[.x]], 14 | mime_type = .x 15 | ) %>% unnest() 16 | }) -> aa_df 17 | 18 | map_df(names(bb), ~{ 19 | tibble( 20 | extension = bb[[.x]][["extensions"]], 21 | mime_type = .x 22 | ) %>% unnest() 23 | }) -> bb_df 24 | 25 | bind_rows(aa_df, bb_df, read_csv("tools/orig-db.csv", col_types = "cc")) %>% 26 | distinct() %>% 27 | arrange(extension, mime_type) %>% 28 | mutate_all(as.character) %>% 29 | mutate_all(trimws) -> simplemagic_mime_db 30 | 31 | use_data(simplemagic_mime_db, internal = TRUE, overwrite = TRUE) 32 | -------------------------------------------------------------------------------- /R/wand-package.R: -------------------------------------------------------------------------------- 1 | #' Retrieve 'Magic' Attributes from Files and Directories 2 | #' 3 | #' The 'libmagic' library provides functions to determine 'MIME' type and other 4 | #' metadata from files through their "magic" attributes. This is useful when you 5 | #' do not wish to rely solely on the honesty of a user or the extension on a 6 | #' file name. It also incorporates other metadata from the mime-db database 7 | #' 8 | #' 9 | #' @section Some important details: 10 | #' 11 | #' The header checking is minimal (i.e. nowhere near as comprehensive as `libmagic`) but 12 | #' covers quite a bit of ground. If there are content-check types from 13 | #' [`magic sources`](https://github.com/threatstack/libmagic/tree/master/magic/) 14 | #' that you would like coded into the package, please file an issue and 15 | #' _include the full line(s)_ from that linked `magic.tab` that you would like mapped. 16 | #' 17 | #' @md 18 | #' @name wand 19 | #' @docType package 20 | #' @author Bob Rudis (bob@@rud.is) 21 | #' @importFrom tools file_ext 22 | NULL 23 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | # DO NOT CHANGE the "init" and "install" sections below 2 | 3 | # Download script file from GitHub 4 | init: 5 | ps: | 6 | $ErrorActionPreference = "Stop" 7 | Invoke-WebRequest http://raw.github.com/krlmlr/r-appveyor/master/scripts/appveyor-tool.ps1 -OutFile "..\appveyor-tool.ps1" 8 | Import-Module '..\appveyor-tool.ps1' 9 | 10 | install: 11 | ps: Bootstrap 12 | 13 | cache: 14 | - C:\RLibrary 15 | 16 | # Adapt as necessary starting from here 17 | 18 | build_script: 19 | - travis-tool.sh install_deps 20 | 21 | test_script: 22 | - travis-tool.sh run_tests 23 | 24 | on_failure: 25 | - 7z a failure.zip *.Rcheck\* 26 | - appveyor PushArtifact failure.zip 27 | 28 | artifacts: 29 | - path: '*.Rcheck\**\*.log' 30 | name: Logs 31 | 32 | - path: '*.Rcheck\**\*.out' 33 | name: Logs 34 | 35 | - path: '*.Rcheck\**\*.fail' 36 | name: Logs 37 | 38 | - path: '*.Rcheck\**\*.Rout' 39 | name: Logs 40 | 41 | - path: '\*_*.tar.gz' 42 | name: Bits 43 | 44 | - path: '\*_*.zip' 45 | name: Bits 46 | -------------------------------------------------------------------------------- /R/check-office.R: -------------------------------------------------------------------------------- 1 | check_office <- function(hdr, path) { 2 | 3 | # [Content_Types.xml] || length 19 4 | c( 5 | 0x5b,0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x5f,0x54, 6 | 0x79,0x70,0x65,0x73,0x5d,0x2e,0x78,0x6d,0x6c 7 | ) -> pat_content_types 8 | 9 | # _rels/.rels || length 11 10 | pat_rels <- c(0x5f,0x72,0x65,0x6c,0x73,0x2f,0x2e,0x72,0x65,0x6c,0x73) 11 | 12 | if ((all(pat_content_types == hdr[31:49])) || (all(pat_rels == hdr[31:41]))) { 13 | 14 | hdr <- readBin(path, "raw", n=4096) 15 | 16 | pat_word <- c(0x77,0x6f,0x72,0x64,0x2f) 17 | if (length(seq_in(hdr, pat_word)) > 0) 18 | return("application/vnd.openxmlformats-officedocument.wordprocessingml.document") 19 | 20 | pat_ppt <- c(0x70,0x70,0x74,0x2f) 21 | if (length(seq_in(hdr, pat_ppt)) > 0) 22 | return("application/vnd.openxmlformats-officedocument.presentationml.presentation") 23 | 24 | pat_xl <- c(0x78,0x6c,0x2f) 25 | if (length(seq_in(hdr, pat_xl)) > 0) 26 | return("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") 27 | 28 | } 29 | 30 | return(NULL) 31 | 32 | } 33 | -------------------------------------------------------------------------------- /man/wand.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/wand-package.R 3 | \docType{package} 4 | \name{wand} 5 | \alias{wand} 6 | \alias{wand-package} 7 | \title{Retrieve 'Magic' Attributes from Files and Directories} 8 | \description{ 9 | The 'libmagic' library provides functions to determine 'MIME' type and other 10 | metadata from files through their "magic" attributes. This is useful when you 11 | do not wish to rely solely on the honesty of a user or the extension on a 12 | file name. It also incorporates other metadata from the mime-db database 13 | \url{https://github.com/jshttp/mime-db} 14 | } 15 | \section{Some important details}{ 16 | 17 | 18 | The header checking is minimal (i.e. nowhere near as comprehensive as \code{libmagic}) but 19 | covers quite a bit of ground. If there are content-check types from 20 | \href{https://github.com/threatstack/libmagic/tree/master/magic/}{magic sources} 21 | that you would like coded into the package, please file an issue and 22 | \emph{include the full line(s)} from that linked \code{magic.tab} that you would like mapped. 23 | } 24 | 25 | \author{ 26 | Bob Rudis (bob@rud.is) 27 | } 28 | -------------------------------------------------------------------------------- /man/guess_content_type.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/guess-content-type.R 3 | \name{guess_content_type} 4 | \alias{guess_content_type} 5 | \title{Guess MIME type from filename (extension)} 6 | \usage{ 7 | guess_content_type(path, not_found = "???", custom_db = NULL) 8 | } 9 | \arguments{ 10 | \item{path}{path to file} 11 | 12 | \item{not_found}{MIME type to use when the content cannot be guessed by 13 | file type.} 14 | 15 | \item{custom_db}{a single data frames each with two columns: 16 | \code{mime_type} and \code{extension}. These sources will be used along with 17 | the built-in sources and will take priority over the built-in sources. 18 | Note that the \code{extension}s should be lower case as they are in the 19 | official MIME database.} 20 | } 21 | \value{ 22 | character vector 23 | } 24 | \description{ 25 | Uses an internal database of over 1,800 file extension-to-MIME mappings to 26 | return one or more associated types for a given input path. If no match is 27 | found, \code{???} is returned. 28 | } 29 | \examples{ 30 | guess_content_type(system.file("extdat", "pass-through", "test.pdf", package="wand")) 31 | } 32 | -------------------------------------------------------------------------------- /man/get_content_type.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/get-content-type.R 3 | \name{get_content_type} 4 | \alias{get_content_type} 5 | \title{Discover MIME type of a file based on contents} 6 | \usage{ 7 | get_content_type(path, guess = TRUE, ...) 8 | } 9 | \arguments{ 10 | \item{path}{path to a file} 11 | 12 | \item{guess}{if \code{TRUE} (the default), calls \code{\link[=guess_content_type]{guess_content_type()}} if 13 | no internal rules match the magic header} 14 | 15 | \item{...}{passed on to \code{\link[=guess_content_type]{guess_content_type()}} if \code{guess} is \code{TRUE}} 16 | } 17 | \value{ 18 | character vector 19 | } 20 | \description{ 21 | There are a limited number of header "magic" bytes checked directly by 22 | this function but cover quite a bit of ground. After that, \code{\link[=guess_content_type]{guess_content_type()}} 23 | is called which uses file extension-to-MIME mappings. 24 | } 25 | \details{ 26 | File an issue or PR if more magic-byte-level 27 | comparisons are required/desired. If no match is found, \code{???} is returned 28 | (see \code{\link[=guess_content_type]{guess_content_type()}} for how to override this behaviour). 29 | } 30 | \examples{ 31 | get_content_type(system.file("extdat", "pass-through", "test.pdf", package="wand")) 32 | } 33 | -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 0.1 6 | arimus@users.sourceforge.net 7 | XML magic file 8 | 9 | 10 | 11 | application/x-tar 12 | tar 13 | POSIX tar archive 14 | ustar\000 15 | 16 | 17 | application/x-tar 18 | tar 19 | tar archive 20 | ustar \000GNU 21 | 22 | 23 | application/zip 24 | zip 25 | archive data 26 | PK\003\004 27 | 28 | 29 | application/x-gzip 30 | gz 31 | gzip compressed data 32 | \037\213 33 | 34 | 35 | application/x-bzip2 36 | bz2 37 | bzip2 compressed data 38 | BZh 39 | 40 | 41 | ??? 42 | bat 43 | MS-DOS batch file text 44 | @echo off 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /README.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | output: rmarkdown::github_document 3 | --- 4 | ```{r pkg-knitr-opts, include=FALSE} 5 | hrbrpkghelpr::global_opts() 6 | ``` 7 | 8 | ```{r badges, results='asis', echo=FALSE, cache=FALSE} 9 | hrbrpkghelpr::stinking_badges() 10 | ``` 11 | 12 | ```{r description, results='asis', echo=FALSE, cache=FALSE} 13 | hrbrpkghelpr::yank_title_and_description() 14 | ``` 15 | 16 | ## SOME IMPORTANT DETAILS 17 | 18 | The header checking is minimal (i.e. nowhere near as comprehensive as `libmagic`) but covers quite a bit of ground. If there are content-check types from [`magic sources`](https://github.com/threatstack/libmagic/tree/master/magic/) that you would like coded into the package, please file an issue and _include the full line(s)_ from that linked `magic.tab` that you would like mapped. 19 | 20 | ## What's Inside The Tin 21 | 22 | The following functions are implemented: 23 | 24 | ```{r ingredients, results='asis', echo=FALSE, cache=FALSE} 25 | hrbrpkghelpr::describe_ingredients() 26 | ``` 27 | 28 | ## Installation 29 | 30 | ```{r install-ex, results='asis', echo=FALSE, cache=FALSE} 31 | hrbrpkghelpr::install_block() 32 | ``` 33 | 34 | ## Usage 35 | 36 | ```{r vers, message=FALSE, warning=FALSE, error=FALSE, cache=FALSE} 37 | library(wand) 38 | library(tidyverse) 39 | 40 | # current verison 41 | packageVersion("wand") 42 | ``` 43 | 44 | ```{r ex1} 45 | list.files(system.file("extdat", "pass-through", package="wand"), full.names=TRUE) %>% 46 | map_df(~{ 47 | tibble( 48 | fil = basename(.x), 49 | mime = list(get_content_type(.x)) 50 | ) 51 | }) %>% 52 | unnest() 53 | ``` 54 | 55 | ## wand Metrics 56 | 57 | ```{r cloc, echo=FALSE} 58 | cloc::cloc_pkg_md() 59 | ``` 60 | 61 | ## Code of Conduct 62 | 63 | Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. -------------------------------------------------------------------------------- /R/guess-content-type.R: -------------------------------------------------------------------------------- 1 | #' Guess MIME type from filename (extension) 2 | #' 3 | #' Uses an internal database of over 1,800 file extension-to-MIME mappings to 4 | #' return one or more associated types for a given input path. If no match is 5 | #' found, `???` is returned. 6 | #' 7 | #' @md 8 | #' @param path path to file 9 | #' @param not_found MIME type to use when the content cannot be guessed by 10 | #' file type. 11 | #' @param custom_db a single data frames each with two columns: 12 | #' `mime_type` and `extension`. These sources will be used along with 13 | #' the built-in sources and will take priority over the built-in sources. 14 | #' Note that the `extension`s should be lower case as they are in the 15 | #' official MIME database. 16 | #' @return character vector 17 | #' @export 18 | #' @examples 19 | #' guess_content_type(system.file("extdat", "pass-through", "test.pdf", package="wand")) 20 | guess_content_type <- function(path, not_found = "???", custom_db = NULL) { 21 | 22 | path <- path.expand(path[1]) 23 | if (!file.exists(path)) stop("File not found.", call.=FALSE) 24 | 25 | if (is.null(custom_db)) { 26 | db <- simplemagic_mime_db 27 | } else { 28 | 29 | if (inherits(custom_db, "data.frame")) { 30 | 31 | if (!all(c("mime_type", "extension") %in% colnames(custom_db))) { 32 | stop( 33 | "'custom_db' must have both 'mime_type' and 'extension' columns.", 34 | call.=FALSE 35 | ) 36 | } 37 | 38 | rbind.data.frame( 39 | custom_db[, c("mime_type", "extension")], 40 | simplemagic_mime_db 41 | ) -> db 42 | 43 | db[["mime_type"]] <- as.character(db[["mime_type"]]) 44 | db[["extension"]] <- as.character(db[["extension"]]) 45 | 46 | } else { 47 | stop("'custom_db' must be data frame.", call.=FALSE) 48 | } 49 | 50 | } 51 | 52 | extension <- trimws(tolower(tools::file_ext(path))) 53 | 54 | res <- db[(db$extension == extension),]$mime_type 55 | 56 | if (length(res) == 0) return(not_found) 57 | 58 | return(unique(res)) 59 | 60 | } 61 | -------------------------------------------------------------------------------- /inst/extdat/pass-through/test_excel_spreadsheet.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | David Castro 9 | David Castro 10 | 2004-06-16T02:29:05Z 11 | 2004-06-16T02:29:24Z 12 | Azusa Pacific University 13 | 10.2625 14 | 15 | 16 | 17 | 18 | 19 | 20 | 12660 21 | 17100 22 | 360 23 | 60 24 | False 25 | False 26 | 27 | 28 | 36 | 37 | 38 | 40 | 41 | Test excel 2000 spreadsheet 42 | 43 |
44 | 45 | 46 | False 47 | False 48 | 49 |
50 | 51 | 52 | False 53 | False 54 | 55 | 56 | 57 | 58 | False 59 | False 60 | 61 | 62 |
63 | -------------------------------------------------------------------------------- /.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Mac", 5 | "includePath": [ 6 | "${workspaceFolder}", 7 | "/Library/Developer/CommandLineTools/usr/include/c++/v1", 8 | "/usr/local/include", 9 | "/Library/Developer/CommandLineTools/usr/lib/clang/9.0.0/include", 10 | "/Library/Developer/CommandLineTools/usr/include", 11 | "/usr/include", 12 | "/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include", 13 | "/Library/Frameworks/R.framework/Versions/3.5/PrivateHeaders", 14 | "/Library/Frameworks/R.framework/Versions/3.5/Resources/include" 15 | ], 16 | "defines": [], 17 | "intelliSenseMode": "clang-x64", 18 | "browse": { 19 | "path": [ 20 | "${workspaceFolder}", 21 | "/Library/Developer/CommandLineTools/usr/include/c++/v1", 22 | "/usr/local/include", 23 | "/Library/Developer/CommandLineTools/usr/lib/clang/9.0.0/include", 24 | "/Library/Developer/CommandLineTools/usr/include", 25 | "/usr/include" 26 | ], 27 | "limitSymbolsToIncludedHeaders": true, 28 | "databaseFilename": "" 29 | }, 30 | "macFrameworkPath": [ 31 | "/System/Library/Frameworks", 32 | "/Library/Frameworks" 33 | ], 34 | "compilerPath": "/usr/bin/clang", 35 | "cStandard": "c11", 36 | "cppStandard": "c++17" 37 | }, 38 | { 39 | "name": "Linux", 40 | "includePath": [ 41 | "/usr/include", 42 | "/usr/local/include", 43 | "${workspaceFolder}" 44 | ], 45 | "defines": [], 46 | "intelliSenseMode": "clang-x64", 47 | "browse": { 48 | "path": [ 49 | "/usr/include", 50 | "/usr/local/include", 51 | "${workspaceFolder}" 52 | ], 53 | "limitSymbolsToIncludedHeaders": true, 54 | "databaseFilename": "" 55 | } 56 | }, 57 | { 58 | "name": "Win32", 59 | "includePath": [ 60 | "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include", 61 | "${workspaceFolder}" 62 | ], 63 | "defines": [ 64 | "_DEBUG", 65 | "UNICODE", 66 | "_UNICODE" 67 | ], 68 | "intelliSenseMode": "msvc-x64", 69 | "browse": { 70 | "path": [ 71 | "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include/*", 72 | "${workspaceFolder}" 73 | ], 74 | "limitSymbolsToIncludedHeaders": true, 75 | "databaseFilename": "" 76 | } 77 | } 78 | ], 79 | "version": 3 80 | } -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f36\froman\fcharset238\fprq2 Times New Roman CE;} 2 | {\f37\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f39\froman\fcharset161\fprq2 Times New Roman Greek;}{\f40\froman\fcharset162\fprq2 Times New Roman Tur;}{\f41\froman\fcharset177\fprq2 Times New Roman (Hebrew);} 3 | {\f42\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f43\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f44\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255; 4 | \red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0; 5 | \red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive \ssemihidden 6 | Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv 7 | \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}{\*\rsidtbl \rsid5531693}{\*\generator Microsoft Word 10.0.2627;}{\info 8 | {\title This is a test RTF document}{\author David Castro}{\operator David Castro}{\creatim\yr2004\mo6\dy17\hr19\min29}{\revtim\yr2004\mo6\dy17\hr19\min30}{\version1}{\edmins1}{\nofpages1}{\nofwords4}{\nofchars25}{\*\company Azusa Pacific University} 9 | {\nofcharsws28}{\vern16437}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1800\dgvorigin1440\dghshow1\dgvshow1 10 | \jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct\asianbrkrule\rsidroot5531693 \fet0\sectd 11 | \linex0\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4 12 | \pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (} 13 | {\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 14 | \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid5531693 This is a test RTF document 15 | \par 16 | \par }} -------------------------------------------------------------------------------- /inst/tinytest/test_wand.R: -------------------------------------------------------------------------------- 1 | library(wand) 2 | 3 | list( 4 | actions.csv = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", 5 | actions.txt = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", 6 | actions.xlsx = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", 7 | test_128_44_jstereo.mp3 = "audio/mp3", test_excel_2000.xls = "application/msword", 8 | test_excel_spreadsheet.xml = "application/xml", test_excel_web_archive.mht = "message/rfc822", 9 | test_excel.xlsm = "application/zip", test_excel.xlsx = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", 10 | test_nocompress.tif = "image/tiff", test_powerpoint.pptm = "application/zip", 11 | test_powerpoint.pptx = "application/vnd.openxmlformats-officedocument.presentationml.presentation", 12 | test_word_2000.doc = "application/msword", test_word_6.0_95.doc = "application/msword", 13 | test_word.docm = "application/zip", test_word.docx = "application/vnd.openxmlformats-officedocument.wordprocessingml.document", 14 | test.au = "audio/basic", test.bin = c( 15 | "application/mac-binary", 16 | "application/macbinary", "application/octet-stream", "application/x-binary", 17 | "application/x-macbinary" 18 | ), test.bmp = "image/bmp", test.dtd = "application/xml-dtd", 19 | test.emf = c("application/x-msmetafile", "image/emf"), test.eps = "application/postscript", 20 | test.fli = c("video/flc", "video/fli", "video/x-fli"), test.gif = "image/gif", 21 | test.ico = c("image/vnd.microsoft.icon", "image/x-icon"), 22 | test.jpg = "image/jpeg", test.mp3 = "audio/mp3", test.odt = "application/vnd.oasis.opendocument.text", 23 | test.ogg = c("application/ogg", "audio/ogg"), test.pcx = c( 24 | "image/pcx", 25 | "image/vnd.zbrush.pcx", "image/x-pcx" 26 | ), test.pdf = "application/pdf", 27 | test.pl = c( 28 | "application/x-perl", "text/plain", "text/x-perl", 29 | "text/x-script.perl" 30 | ), test.png = "image/png", test.pnm = c( 31 | "application/x-portable-anymap", 32 | "image/x-portable-anymap" 33 | ), test.ppm = "image/x-portable-pixmap", 34 | test.ppt = "application/msword", test.ps = "application/postscript", 35 | test.psd = "image/photoshop", test.py = c( 36 | "text/x-python", 37 | "text/x-script.phyton" 38 | ), test.rtf = c( 39 | "application/rtf", 40 | "application/x-rtf", "text/richtext", "text/rtf" 41 | ), test.sh = c( 42 | "application/x-bsh", 43 | "application/x-sh", "application/x-shar", "text/x-script.sh", 44 | "text/x-sh" 45 | ), test.tar = "application/tar", test.tar.gz = c( 46 | "application/gzip", 47 | "application/octet-stream", "application/x-compressed", "application/x-gzip" 48 | ), test.tga = "image/x-tga", test.txt = "text/plain", test.txt.gz = c( 49 | "application/gzip", 50 | "application/octet-stream", "application/x-compressed", "application/x-gzip" 51 | ), test.wav = "audio/x-wav", test.wmf = c( 52 | "application/x-msmetafile", 53 | "image/wmf", "windows/metafile" 54 | ), test.xcf = "application/x-xcf", 55 | test.xml = "application/xml", test.xpm = c( 56 | "image/x-xbitmap", 57 | "image/x-xpixmap", "image/xpm" 58 | ), test.zip = "application/zip" 59 | ) -> results 60 | 61 | fils <- list.files(system.file("extdat", "pass-through", package="wand"), full.names=TRUE) 62 | tst <- lapply(fils, get_content_type) 63 | names(tst) <- basename(fils) 64 | 65 | for(n in names(tst)) expect_identical(results[[n]], tst[[n]]) 66 | 67 | no_guess <- system.file("extdat", "no-guess", "csv.docx", package = "wand") 68 | expect_equal(get_content_type(no_guess, guess = FALSE), "???") 69 | 70 | -------------------------------------------------------------------------------- /.build.yml: -------------------------------------------------------------------------------- 1 | image: debian/buster 2 | packages: 3 | - bash-completion 4 | - bison 5 | - debhelper 6 | - default-jdk 7 | - g++ 8 | - gcc 9 | - gdb 10 | - gfortran 11 | - groff-base 12 | - libblas-dev 13 | - libbz2-dev 14 | - libcairo2-dev 15 | - libcurl4-openssl-dev 16 | - libxml2-dev 17 | - libjpeg-dev 18 | - liblapack-dev 19 | - liblzma-dev 20 | - libncurses5-dev 21 | - libpango1.0-dev 22 | - libpcre3-dev 23 | - libpng-dev 24 | - libreadline-dev 25 | - libtiff5-dev 26 | - libx11-dev 27 | - libxt-dev 28 | - mpack 29 | - pandoc 30 | - pandoc-citeproc 31 | - pandoc-data 32 | - subversion 33 | - tcl8.6-dev 34 | - texinfo 35 | - texlive-base 36 | - texlive-extra-utils 37 | - texlive-fonts-extra 38 | - texlive-fonts-recommended 39 | - texlive-generic-recommended 40 | - texlive-latex-base 41 | - texlive-latex-extra 42 | - texlive-latex-recommended 43 | - tk8.6-dev 44 | - x11proto-core-dev 45 | - xauth 46 | - xdg-utils 47 | - xfonts-base 48 | - xvfb 49 | - zlib1g-dev 50 | - ed 51 | - less 52 | - locales 53 | - vim-tiny 54 | - wget 55 | - ca-certificates 56 | - fonts-texgyre 57 | - libssl-dev 58 | - libcurl4-openssl-dev 59 | - r-base 60 | - r-base-dev 61 | - r-recommended 62 | - r-cran-crayon 63 | - r-cran-curl 64 | - r-cran-desc 65 | - r-cran-httr 66 | - r-cran-jsonlite 67 | - r-cran-devtools 68 | - r-cran-knitr 69 | - r-cran-rmarkdown 70 | - r-cran-rprojroot 71 | - r-cran-stringi 72 | - r-cran-testthat 73 | - r-cran-testit 74 | - r-cran-tidyverse 75 | - r-cran-xml2 76 | environment: 77 | R_PACKAGE: wand 78 | sources: 79 | - https://git.sr.ht/~hrbrmstr/wand 80 | tasks: 81 | - setup: | 82 | echo "en_US.UTF-8 UTF-8" > loc 83 | sudo cp loc /etc/locale.gen 84 | sudo locale-gen --purge "en_US.UTF-8" 85 | sudo /usr/sbin/update-locale LANG=en_US.UTF-8 86 | export LC_ALL=en_US.UTF-8 87 | export LANG=en_US.UTF-8 88 | export LANGUAGE=en_US.UTF-8 89 | echo 'options(repos = c(CRAN = "https://cloud.r-project.org"))' > ~/.Rprofile 90 | echo 'R_LIBS_USER=/home/build/packages' > ~/.Renviron 91 | mkdir /home/build/packages 92 | export _R_CHECK_URLS_USE_CURL_=FALSE 93 | export _R_CHECK_LENGTH_1_CONDITION_=TRUE 94 | export _R_CHECK_LENGTH_1_LOGIC2_=TRUE 95 | export _R_CHECK_TOPLEVEL_FILES_=TRUE 96 | export _R_CHECK_VC_DIRS_=TRUE 97 | export _R_CHECK_TIMINGS_=10 98 | export _R_CHECK_INSTALL_DEPENDS_=TRUE 99 | export _R_CHECK_SUGGESTS_ONLY_=TRUE 100 | export _R_CHECK_NO_RECOMMENDED_=TRUE 101 | export _R_CHECK_EXECUTABLES_EXCLUSIONS_=FALSE 102 | export _R_CHECK_DOC_SIZES2_=TRUE 103 | export _R_CHECK_CODE_ASSIGN_TO_GLOBALENV_=TRUE 104 | export _R_CHECK_CODE_ATTACH_=TRUE 105 | export _R_CHECK_CODE_DATA_INTO_GLOBALENV_=TRUE 106 | export _R_CHECK_CODE_USAGE_VIA_NAMESPACES_=TRUE 107 | export _R_CHECK_DOT_FIRSTLIB_=TRUE 108 | export _R_CHECK_DEPRECATED_DEFUNCT_=TRUE 109 | export _R_CHECK_REPLACING_IMPORTS_=TRUE 110 | export _R_CHECK_SCREEN_DEVICE_=stop 111 | export _R_CHECK_TOPLEVEL_FILES_=TRUE 112 | export _R_CHECK_S3_METHODS_NOT_REGISTERED_=TRUE 113 | export _R_CHECK_OVERWRITE_REGISTERED_S3_METHODS_=TRUE 114 | export _R_CHECK_PRAGMAS_=TRUE 115 | export _R_CHECK_CRAN_INCOMING_USE_ASPELL_=TRUE 116 | export _R_CHECK_COMPILATION_FLAGS_=TRUE 117 | export _R_CHECK_R_DEPENDS_=warn 118 | export _R_CHECK_SERIALIZATION_=TRUE 119 | export _R_CHECK_R_ON_PATH_=TRUE 120 | export _R_CHECK_PACKAGES_USED_IN_TESTS_USE_SUBDIRS_=TRUE 121 | export _R_CHECK_SHLIB_OPENMP_FLAGS_=TRUE 122 | export _R_CHECK_CONNECTIONS_LEFT_OPEN_=TRUE 123 | export _R_CHECK_FUTURE_FILE_TIMESTAMPS_=TRUE 124 | export _R_CHECK_AUTOCONF_=TRUE 125 | - build: | 126 | sudo R CMD javareconf 127 | Rscript -e 'install.packages(c("covr", "tinytest"))' 128 | R CMD build ${R_PACKAGE} 129 | R CMD check ${R_PACKAGE}_*gz 130 | -------------------------------------------------------------------------------- /inst/extdat/pass-through/test_excel_web_archive.mht: -------------------------------------------------------------------------------- 1 | MIME-Version: 1.0 2 | X-Document-Type: Worksheet 3 | Content-Location: file:///C:/2A65B325/test_excel_web_archive.htm 4 | Content-Transfer-Encoding: quoted-printable 5 | Content-Type: text/html; charset="us-ascii" 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 18 | 20 | 35 | 94 | 131 | 132 | 133 | 134 | 135 | 138 | 139 | 140 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 |
Test excel 2000 spreadsheet
152 | 153 | 154 | 155 | 156 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | [![Project Status: Active – The project has reached a stable, usable 3 | state and is being actively 4 | developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) 5 | [![Signed 6 | by](https://img.shields.io/badge/Keybase-Verified-brightgreen.svg)](https://keybase.io/hrbrmstr) 7 | ![Signed commit 8 | %](https://img.shields.io/badge/Signed_Commits-100%25-lightgrey.svg) 9 | [![Linux build 10 | Status](https://travis-ci.org/hrbrmstr/wand.svg?branch=master)](https://travis-ci.org/hrbrmstr/wand) 11 | [![builds.sr.ht 12 | status](https://builds.sr.ht/~hrbrmstr/wand.svg)](https://builds.sr.ht/~hrbrmstr/wand?) 13 | [![Windows build 14 | status](https://ci.appveyor.com/api/projects/status/github/hrbrmstr/wand?svg=true)](https://ci.appveyor.com/project/hrbrmstr/wand) 15 | [![Coverage 16 | Status](https://codecov.io/gh/hrbrmstr/wand/branch/master/graph/badge.svg)](https://codecov.io/gh/hrbrmstr/wand) 17 | [![cran 18 | checks](https://cranchecks.info/badges/worst/wand)](https://cranchecks.info/pkgs/wand) 19 | [![CRAN 20 | status](https://www.r-pkg.org/badges/version/wand)](https://www.r-pkg.org/pkg/wand) 21 | ![Minimal R 22 | Version](https://img.shields.io/badge/R%3E%3D-3.2.0-blue.svg) 23 | ![License](https://img.shields.io/badge/License-MIT-blue.svg) 24 | 25 | # wand 26 | 27 | Retrieve Magic Attributes from Files and Directories 28 | 29 | ## Description 30 | 31 | MIME types are shorthand descriptors for file contents and can be 32 | determined from “magic” bytes in file headers, file contents or intuited 33 | from file extensions. Tools are provided to perform curated “magic” 34 | tests as well as mapping MIME types from a database of over 1,800 35 | extension mappings. 36 | 37 | ## SOME IMPORTANT DETAILS 38 | 39 | The header checking is minimal (i.e. nowhere near as comprehensive as 40 | `libmagic`) but covers quite a bit of ground. If there are content-check 41 | types from [`magic 42 | sources`](https://github.com/threatstack/libmagic/tree/master/magic/) 43 | that you would like coded into the package, please file an issue and 44 | *include the full line(s)* from that linked `magic.tab` that you would 45 | like mapped. 46 | 47 | ## What’s Inside The Tin 48 | 49 | The following functions are implemented: 50 | 51 | - `get_content_type`: Discover MIME type of a file based on contents 52 | - `guess_content_type`: Guess MIME type from filename (extension) 53 | - `simplemagic_mime_db`: File extension-to-MIME mapping data frame 54 | 55 | ## Installation 56 | 57 | ``` r 58 | install.packages("wand", repos = "https://cinc.rud.is") 59 | # or 60 | remotes::install_git("https://git.rud.is/hrbrmstr/wand.git") 61 | # or 62 | remotes::install_git("https://git.sr.ht/~hrbrmstr/wand") 63 | # or 64 | remotes::install_gitlab("hrbrmstr/wand") 65 | # or 66 | remotes::install_bitbucket("hrbrmstr/wand") 67 | # or 68 | remotes::install_github("hrbrmstr/wand") 69 | ``` 70 | 71 | NOTE: To use the ‘remotes’ install options you will need to have the 72 | [{remotes} package](https://github.com/r-lib/remotes) installed. 73 | 74 | ## Usage 75 | 76 | ``` r 77 | library(wand) 78 | library(tidyverse) 79 | 80 | # current verison 81 | packageVersion("wand") 82 | ## [1] '0.6.0' 83 | ``` 84 | 85 | ``` r 86 | list.files(system.file("extdat", "pass-through", package="wand"), full.names=TRUE) %>% 87 | map_df(~{ 88 | tibble( 89 | fil = basename(.x), 90 | mime = list(get_content_type(.x)) 91 | ) 92 | }) %>% 93 | unnest() 94 | ## # A tibble: 85 x 2 95 | ## fil mime 96 | ## 97 | ## 1 actions.csv application/vnd.openxmlformats-officedocument.spreadsheetml.sheet 98 | ## 2 actions.txt application/vnd.openxmlformats-officedocument.spreadsheetml.sheet 99 | ## 3 actions.xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet 100 | ## 4 test_128_44_jstereo.mp3 audio/mp3 101 | ## 5 test_excel_2000.xls application/msword 102 | ## 6 test_excel_spreadsheet.xml application/xml 103 | ## 7 test_excel_web_archive.mht message/rfc822 104 | ## 8 test_excel.xlsm application/zip 105 | ## 9 test_excel.xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet 106 | ## 10 test_nocompress.tif image/tiff 107 | ## # … with 75 more rows 108 | ``` 109 | 110 | ## wand Metrics 111 | 112 | | Lang | \# Files | (%) | LoC | (%) | Blank lines | (%) | \# Lines | (%) | 113 | | :--- | -------: | ---: | --: | ---: | ----------: | ---: | -------: | ---: | 114 | | R | 7 | 0.78 | 159 | 0.62 | 62 | 0.78 | 72 | 0.71 | 115 | | JSON | 1 | 0.11 | 80 | 0.31 | 0 | 0.00 | 0 | 0.00 | 116 | | Rmd | 1 | 0.11 | 17 | 0.07 | 17 | 0.22 | 29 | 0.29 | 117 | 118 | ## Code of Conduct 119 | 120 | Please note that this project is released with a Contributor Code of 121 | Conduct. By participating in this project you agree to abide by its 122 | terms. 123 | -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.ps: -------------------------------------------------------------------------------- 1 | %!PS-Adobe-2.0 2 | %%DocumentFonts: Courier Times-Bold 3 | %%Title: (mpage) 4 | %%Creator: mpage 2.5.1pre2 March 1998 5 | %%CreationDate: Tue Jun 15 20:04:08 2004 6 | %%Orientation: Portrait 7 | %%DocumentMedia: A4 596 842 8 | %%BoundingBox: 20 20 576 822 9 | %%Pages: (atend) 10 | %%EndComments 11 | 12 | %%BeginProlog 13 | 14 | /mp_stm usertime def 15 | /mp_pgc statusdict begin pagecount end def 16 | statusdict begin /jobname () def end 17 | /reencsmalldict 12 dict def /ReEncodeSmall { reencsmalldict begin 18 | /newcodesandnames exch def /newfontname exch def /basefontname exch def 19 | /basefontdict basefontname findfont def /newfont basefontdict maxlength dict def 20 | basefontdict { exch dup /FID ne { dup /Encoding eq { exch dup length array copy newfont 3 1 roll put } { exch newfont 3 1 roll put } 21 | ifelse } 22 | { pop pop } 23 | ifelse } forall 24 | newfont /FontName newfontname put 25 | newcodesandnames aload pop newcodesandnames length 2 idiv 26 | { newfont /Encoding get 3 1 roll put } repeat 27 | newfontname newfont definefont pop end } def 28 | /charvec [ 29 | 026 /Scaron 30 | 027 /Ydieresis 31 | 028 /Zcaron 32 | 029 /scaron 33 | 030 /trademark 34 | 031 /zcaron 35 | 032 /space 36 | 033 /exclam 37 | 034 /quotedbl 38 | 035 /numbersign 39 | 036 /dollar 40 | 037 /percent 41 | 038 /ampersand 42 | 039 /quoteright 43 | 040 /parenleft 44 | 041 /parenright 45 | 042 /asterisk 46 | 043 /plus 47 | 044 /comma 48 | 045 /minus 49 | 046 /period 50 | 047 /slash 51 | 048 /zero 52 | 049 /one 53 | 050 /two 54 | 051 /three 55 | 052 /four 56 | 053 /five 57 | 054 /six 58 | 055 /seven 59 | 056 /eight 60 | 057 /nine 61 | 058 /colon 62 | 059 /semicolon 63 | 060 /less 64 | 061 /equal 65 | 062 /greater 66 | 063 /question 67 | 064 /at 68 | 065 /A 69 | 066 /B 70 | 067 /C 71 | 068 /D 72 | 069 /E 73 | 070 /F 74 | 071 /G 75 | 072 /H 76 | 073 /I 77 | 074 /J 78 | 075 /K 79 | 076 /L 80 | 077 /M 81 | 078 /N 82 | 079 /O 83 | 080 /P 84 | 081 /Q 85 | 082 /R 86 | 083 /S 87 | 084 /T 88 | 085 /U 89 | 086 /V 90 | 087 /W 91 | 088 /X 92 | 089 /Y 93 | 090 /Z 94 | 091 /bracketleft 95 | 092 /backslash 96 | 093 /bracketright 97 | 094 /asciicircum 98 | 095 /underscore 99 | 096 /quoteleft 100 | 097 /a 101 | 098 /b 102 | 099 /c 103 | 100 /d 104 | 101 /e 105 | 102 /f 106 | 103 /g 107 | 104 /h 108 | 105 /i 109 | 106 /j 110 | 107 /k 111 | 108 /l 112 | 109 /m 113 | 110 /n 114 | 111 /o 115 | 112 /p 116 | 113 /q 117 | 114 /r 118 | 115 /s 119 | 116 /t 120 | 117 /u 121 | 118 /v 122 | 119 /w 123 | 120 /x 124 | 121 /y 125 | 122 /z 126 | 123 /braceleft 127 | 124 /bar 128 | 125 /braceright 129 | 126 /asciitilde 130 | 127 /.notdef 131 | 128 /fraction 132 | 129 /florin 133 | 130 /quotesingle 134 | 131 /quotedblleft 135 | 132 /guilsinglleft 136 | 133 /guilsinglright 137 | 134 /fi 138 | 135 /fl 139 | 136 /endash 140 | 137 /dagger 141 | 138 /daggerdbl 142 | 139 /bullet 143 | 140 /quotesinglbase 144 | 141 /quotedblbase 145 | 142 /quotedblright 146 | 143 /ellipsis 147 | 144 /dotlessi 148 | 145 /grave 149 | 146 /acute 150 | 147 /circumflex 151 | 148 /tilde 152 | 149 /oe 153 | 150 /breve 154 | 151 /dotaccent 155 | 152 /perthousand 156 | 153 /emdash 157 | 154 /ring 158 | 155 /Lslash 159 | 156 /OE 160 | 157 /hungarumlaut 161 | 158 /ogonek 162 | 159 /caron 163 | 160 /lslash 164 | 161 /exclamdown 165 | 162 /cent 166 | 163 /sterling 167 | 164 /currency 168 | 165 /yen 169 | 166 /brokenbar 170 | 167 /section 171 | 168 /dieresis 172 | 169 /copyright 173 | 170 /ordfeminine 174 | 171 /guillemotleft 175 | 172 /logicalnot 176 | 173 /hyphen 177 | 174 /registered 178 | 175 /macron 179 | 176 /degree 180 | 177 /plusminus 181 | 178 /twosuperior 182 | 179 /threesuperior 183 | 180 /acute 184 | 181 /mu 185 | 182 /paragraph 186 | 183 /periodcentered 187 | 184 /cedilla 188 | 185 /onesuperior 189 | 186 /ordmasculine 190 | 187 /guillemotright 191 | 188 /onequarter 192 | 189 /onehalf 193 | 190 /threequarters 194 | 191 /questiondown 195 | 192 /Agrave 196 | 193 /Aacute 197 | 194 /Acircumflex 198 | 195 /Atilde 199 | 196 /Adieresis 200 | 197 /Aring 201 | 198 /AE 202 | 199 /Ccedilla 203 | 200 /Egrave 204 | 201 /Eacute 205 | 202 /Ecircumflex 206 | 203 /Edieresis 207 | 204 /Igrave 208 | 205 /Iacute 209 | 206 /Icircumflex 210 | 207 /Idieresis 211 | 208 /Eth 212 | 209 /Ntilde 213 | 210 /Ograve 214 | 211 /Oacute 215 | 212 /Ocircumflex 216 | 213 /Otilde 217 | 214 /Odieresis 218 | 215 /multiply 219 | 216 /Oslash 220 | 217 /Ugrave 221 | 218 /Uacute 222 | 219 /Ucircumflex 223 | 220 /Udieresis 224 | 221 /Yacute 225 | 222 /Thorn 226 | 223 /germandbls 227 | 224 /agrave 228 | 225 /aacute 229 | 226 /acircumflex 230 | 227 /atilde 231 | 228 /adieresis 232 | 229 /aring 233 | 230 /ae 234 | 231 /ccedilla 235 | 232 /egrave 236 | 233 /eacute 237 | 234 /ecircumflex 238 | 235 /edieresis 239 | 236 /igrave 240 | 237 /iacute 241 | 238 /icircumflex 242 | 239 /idieresis 243 | 240 /eth 244 | 241 /ntilde 245 | 242 /ograve 246 | 243 /oacute 247 | 244 /ocircumflex 248 | 245 /otilde 249 | 246 /odieresis 250 | 247 /divide 251 | 248 /oslash 252 | 249 /ugrave 253 | 250 /uacute 254 | 251 /ucircumflex 255 | 252 /udieresis 256 | 253 /yacute 257 | 254 /thorn 258 | 255 /ydieresis 259 | ] def 260 | /Courier /OurCharSet charvec ReEncodeSmall 261 | /textfont /OurCharSet findfont 11 scalefont def 262 | /fnamefont /Times-Bold findfont 14 scalefont def 263 | /headerfont /Times-Bold findfont 12 scalefont def 264 | textfont setfont 265 | (a) stringwidth pop /mp_a_x exch def 266 | %%EndProlog 267 | %%Page: 1 1 268 | save 269 | gsave 270 | 20 421 translate 271 | 0 0 moveto 0 401 rlineto 278 0 rlineto 0 -401 rlineto closepath clip 272 | 278 80 mp_a_x mul div 401 792 div scale 273 | 4 7 translate 270 278 div 784 792 div scale 274 | textfont setfont 275 | 0 780 moveto (This is a plain text file) show 276 | grestore 277 | restore 278 | showpage 279 | %%Trailer 280 | %%Pages: 1 281 | -------------------------------------------------------------------------------- /R/get-content-type.R: -------------------------------------------------------------------------------- 1 | #' Discover MIME type of a file based on contents 2 | #' 3 | #' There are a limited number of header "magic" bytes checked directly by 4 | #' this function but cover quite a bit of ground. After that, [guess_content_type()] 5 | #' is called which uses file extension-to-MIME mappings. 6 | #' 7 | #' File an issue or PR if more magic-byte-level 8 | #' comparisons are required/desired. If no match is found, `???` is returned 9 | #' (see [guess_content_type()] for how to override this behaviour). 10 | #' 11 | #' @md 12 | #' @param path path to a file 13 | #' @param guess if `TRUE` (the default), calls [guess_content_type()] if 14 | #' no internal rules match the magic header 15 | #' @param ... passed on to [guess_content_type()] if `guess` is `TRUE` 16 | #' @return character vector 17 | #' @export 18 | #' @examples 19 | #' get_content_type(system.file("extdat", "pass-through", "test.pdf", package="wand")) 20 | get_content_type <- function(path, guess = TRUE, ...) { 21 | 22 | path <- path.expand(path[1]) 23 | if (!file.exists(path)) stop("File not found.", call.=FALSE) 24 | 25 | hdr <- readBin(path, "raw", n=1024) 26 | 27 | if (all(c(0x4F,0x62,0x6A,0x01) == hdr[1:4])) return("application/vnd.apache.avro+binary") 28 | if (all(c(0x50,0x41,0x52,0x31) == hdr[1:4])) return("application/x-parquet") 29 | 30 | if (all(c(0xCA,0xFE,0xBA,0xBE) == hdr[1:4])) return("application/java-vm") 31 | 32 | if (all(c(0xD0,0xCF,0x11,0xE0,0xA1,0xB1,0x1A,0xE1) == hdr[1:8])) { 33 | 34 | if (guess) { 35 | guessed_name <- guess_content_type(path) 36 | if ((length(guessed_name) == 1) && (guessed_name != "???")) return(guessed_name) 37 | } 38 | 39 | return("application/msword") 40 | 41 | } 42 | 43 | if (all(c(0x25,0x50,0x44,0x46,0x2d,0x31,0x2e) == hdr[1:7])) return("application/pdf") 44 | if (all(c(0x25,0x50,0x44,0x46) == hdr[1:4])) return("application/x-pdf") 45 | 46 | if (all(c(0x38,0x42,0x50,0x53,0x00,0x01) == hdr[1:6])) return("image/photoshop") 47 | 48 | if (all(c(0x25,0x21,0x50,0x53) == hdr[1:4])) return("application/postscript") 49 | 50 | if (all(c(0xff,0xfb,0x30) == hdr[1:3])) return("audio/mp3") 51 | if (all(c(0xff,0xfb,0xd0) == hdr[1:3])) return("audio/mp3") 52 | if (all(c(0xff,0xfb,0x90) == hdr[1:3])) return("audio/mp3") 53 | if (all(c(0x49,0x44,0x33) == hdr[1:3])) return("audio/mp3") 54 | if (all(c(0xAC,0xED) == hdr[1:2])) return("application/x-java-serialized-object") 55 | 56 | if (all(c(0x4c,0x5a,0x49,0x50) == hdr[1:4])) return("application/x-lzip") 57 | 58 | if (hdr[1] == 0x3c) { # "<" 59 | if (all(c(0x68,0x74,0x6d,0x6c) == hdr[2:5])) return("text/html") # "html" 60 | if (all(c(0x48,0x54,0x4d,0x4c) == hdr[2:5])) return("text/html") # "HTML" 61 | if (all(c(0x48,0x45,0x41,0x44) == hdr[2:5])) return("text/html") # "HEAD" 62 | if (all(c(0x68,0x65,0x61,0x64) == hdr[2:5])) return("text/html") # "head" 63 | if (all(c(0x3f,0x78,0x6d,0x6c,0x20) == hdr[2:6])) return("application/xml") 64 | } 65 | 66 | if (all(c(0x0a,0x0d,0x0d,0x0a) == hdr[1:4])) "application/x-pcapng" 67 | 68 | if (all(c(0xa1,0xb2,0xc3,0xd4) == hdr[1:4]) || 69 | all(c(0xd4,0xc3,0xb2,0xa1) == hdr[1:4])) return("application/x-cap") 70 | 71 | if (all(c(0xfe,0xff) == hdr[1:2])) { 72 | if (all(c(0x00,0x3c,0x00,0x3f,0x00,0x78) == hdr[3:8])) return("application/xml") 73 | } 74 | 75 | if (all(c(0x42,0x4d) == hdr[1:2])) return("image/bmp") 76 | if (all(c(0x49,0x49,0x2a,0x00) == hdr[1:4])) return("image/tiff") 77 | if (all(c(0x4D,0x4D,0x00,0x2a) == hdr[1:4])) return("image/tiff") 78 | if (all(c(0x47,0x49,0x46,0x38) == hdr[1:4])) return("image/gif") 79 | if (all(c(0x23,0x64,0x65,0x66) == hdr[1:4])) return("image/x-bitmap") 80 | if (all(c(0x21,0x20,0x58,0x50,0x4d,0x32) == hdr[1:6])) return("image/x-pixmap") 81 | if (all(c(137,80,78,71,13,10,26,10) == hdr[1:8])) return("image/png") 82 | 83 | if (all(c(0x23,0x21,0x2f,0x62,0x69,0x6e,0x2f,0x6e,0x6f,0x64,0x65) == hdr[1:11])) 84 | return("application/javascript") 85 | if (all(c(0x23,0x21,0x2f,0x62,0x69,0x6e,0x2f,0x6e,0x6f,0x64,0x65,0x6a,0x73) == hdr[1:13])) 86 | return("application/javascript") 87 | if (all(c(0x23,0x21,0x2f,0x75,0x73,0x72,0x2f,0x62,0x69,0x6e,0x2f,0x6e,0x6f,0x64,0x65) == hdr[1:15])) 88 | return("application/javascript") 89 | if (all(c(0x23,0x21,0x2f,0x75,0x73,0x72,0x2f,0x62,0x69,0x6e,0x2f,0x6e,0x6f,0x64,0x65,0x6a,0x73) == hdr[1:17])) 90 | return("application/javascript") 91 | if (all(c(0x23,0x21,0x2f,0x75,0x73,0x72,0x2f,0x62,0x69,0x6e,0x2f,0x65,0x6e,0x76,0x20,0x6e,0x6f,0x64,0x65) == hdr[1:19])) 92 | return("application/javascript") 93 | if (all(c(0x23,0x21,0x2f,0x75,0x73,0x72,0x2f,0x62,0x69,0x6e,0x2f,0x65,0x6e,0x76,0x20,0x6e,0x6f,0x64,0x65,0x6a,0x73) == hdr[1:21])) 94 | return("application/javascript") 95 | 96 | if (all(c(0xFF,0xD8,0xFF) == hdr[1:3])) { 97 | if (0xDB == hdr[4]) return("image/jpeg") 98 | if (0xE0 == hdr[4]) return("image/jpeg") 99 | if (0xE1 == hdr[4]) { 100 | if (all(c(0x45,0x78,0x69,0x66,0x00) == hdr[7:11])) return("image/jpeg") # Exif 101 | } 102 | if (0xEE == hdr[4]) return("image/jpg") 103 | } 104 | 105 | if (all(c(0x41,0x43) == hdr[1:2]) && all(c(0x00,0x00,0x00,0x00,0x00) == hdr[7:11])) 106 | return("application/acad") 107 | 108 | if (all(c(0x2E,0x73,0x6E,0x64) == hdr[1:4])) return("audio/basic") 109 | if (all(c(0x64,0x6E,0x73,0x2E) == hdr[1:4])) return("audio/basic") 110 | if (all(c(0x52,0x49,0x46,0x46) == hdr[1:4])) return("audio/x-wav") # "RIFF" 111 | 112 | if (all(c(0x50, 0x4b) == hdr[1:2])) { # "PK" 113 | 114 | office_type <- check_office(hdr, path) 115 | if (length(office_type) > 0) return(office_type) 116 | 117 | if (guess) { 118 | guessed_name <- guess_content_type(path) 119 | if ((length(guessed_name) == 1) && (guessed_name != "???")) return(guessed_name) 120 | } 121 | 122 | return("application/zip") 123 | 124 | } 125 | 126 | if (all(c(0x00,0x61,0x73,0x6d) == hdr[1:4])) return("application/wasm") 127 | 128 | if (all(c(0x37,0x7A,0xBC,0xAF,0x27,0x1C) == hdr[1:6])) return("application/x-7z-compressed") 129 | 130 | if (all(c(0x5a,0x4d) == hdr[1:2])) return("x-system/exe") 131 | 132 | if (all(c(0x75,0x73,0x74,0x61,0x72) == hdr[258:262])) { 133 | if (all(c(0x00,0x30,0x30) == hdr[263:265]) || all(c(0x20,0x20,0x00) == hdr[263:265])) { 134 | return("application/tar") 135 | } else { 136 | return("application/pax") 137 | } 138 | } 139 | 140 | if (all(c(0x00,0x00,0x01,0xBA) == hdr[1:4])) return("video/mpeg") 141 | if (all(c(0x00,0x00,0x01,0xB3) == hdr[1:4])) return("video/mpeg") 142 | 143 | if (!guess) return("???") 144 | 145 | return(guess_content_type(path, ...)) 146 | 147 | } 148 | -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.eps: -------------------------------------------------------------------------------- 1 | %!PS-Adobe-3.0 EPSF-3.0 2 | %%Creator: GIMP PostScript file plugin V 1.16 by Peter Kirchgessner 3 | %%Title: /home/arimus/test.eps 4 | %%CreationDate: Tue Jun 15 19:43:49 2004 5 | %%DocumentData: Clean7Bit 6 | %%LanguageLevel: 2 7 | %%Pages: 1 8 | %%BoundingBox: 14 14 115 115 9 | %%EndComments 10 | %%BeginProlog 11 | % Use own dictionary to avoid conflicts 12 | 10 dict begin 13 | %%EndProlog 14 | %%Page: 1 1 15 | % Translate for offset 16 | 14.173228346456694 14.173228346456694 translate 17 | % Translate to begin of first scanline 18 | 0 99.999999999999986 translate 19 | 99.999999999999986 -99.999999999999986 scale 20 | % Image geometry 21 | 100 100 8 22 | % Transformation matrix 23 | [ 100 0 0 100 0 0 ] 24 | % Strings to hold RGB-samples per scanline 25 | /rstr 100 string def 26 | /gstr 100 string def 27 | /bstr 100 string def 28 | {currentfile /ASCII85Decode filter /RunLengthDecode filter rstr readstring pop} 29 | {currentfile /ASCII85Decode filter /RunLengthDecode filter gstr readstring pop} 30 | {currentfile /ASCII85Decode filter /RunLengthDecode filter bstr readstring pop} 31 | true 3 32 | %%BeginData: 4976 ASCII Bytes 33 | colorimage 34 | Sc=3~> 35 | Sc=3~> 36 | Sc=3~> 37 | Sc=3~> 38 | Sc=3~> 39 | Sc=3~> 40 | Sc=3~> 41 | Sc=3~> 42 | Sc=3~> 43 | Sc=3~> 44 | Sc=3~> 45 | Sc=3~> 46 | Sc=3~> 47 | Sc=3~> 48 | Sc=3~> 49 | Sc=3~> 50 | Sc=3~> 51 | Sc=3~> 52 | Sc=3~> 53 | Sc=3~> 54 | Sc=3~> 55 | Sc=3~> 56 | Sc=3~> 57 | Sc=3~> 58 | Sc=3~> 59 | Sc=3~> 60 | Sc=3~> 61 | Sc=3~> 62 | Sc=3~> 63 | Sc=3~> 64 | Sc=3~> 65 | Sc=3~> 66 | Sc=3~> 67 | Sc=3~> 68 | Sc=3~> 69 | Sc=3~> 70 | Sc=3~> 71 | Sc=3~> 72 | Sc=3~> 73 | Sc=3~> 74 | Sc=3~> 75 | Sc=3~> 76 | Sc=3~> 77 | Sc=3~> 78 | Sc=3~> 79 | Sc=3~> 80 | Sc=3~> 81 | Sc=3~> 82 | Sc=3~> 83 | Sc=3~> 84 | Sc=3~> 85 | Sc=3~> 86 | Sc=3~> 87 | Sc=3~> 88 | Sc=3~> 89 | Sc=3~> 90 | Sc=3~> 91 | Sc=3~> 92 | Sc=3~> 93 | Sc=3~> 94 | Sc=3~> 95 | Sc=3~> 96 | Sc=3~> 97 | Sc=3~> 98 | Sc=3~> 99 | Sc=3~> 100 | Sc=3~> 101 | Sc=3~> 102 | Sc=3~> 103 | Sc=3~> 104 | Sc=3~> 105 | Sc=3~> 106 | Sc=3~> 107 | Sc=3~> 108 | Sc=3~> 109 | Sc=3~> 110 | Sc=3~> 111 | Sc=3~> 112 | Sc=3~> 113 | Sc=3~> 114 | Sc=3~> 115 | Sc=3~> 116 | Sc=3~> 117 | Sc=3~> 118 | Sc=3~> 119 | Sc=3~> 120 | Sc=3~> 121 | Sc=3~> 122 | Sc=3~> 123 | Sc=3~> 124 | Sc=3~> 125 | Sc=3~> 126 | Sc=3~> 127 | Sc=3~> 128 | Sc=3~> 129 | Sc=3~> 130 | Sc=3~> 131 | Sc=3~> 132 | Sc=3~> 133 | Sc=3~> 134 | Sc=3~> 135 | Sc=3~> 136 | Sc=3~> 137 | Sc=3~> 138 | Sc=3~> 139 | Sc=3~> 140 | Sc=3~> 141 | Sc=3~> 142 | Sc=3~> 143 | Sc=3~> 144 | Sc=3~> 145 | p]'IX^]/f~> 146 | p]'IX^]/f~> 147 | p]'IX^]/f~> 148 | p]'IXf`1mMm/MS~> 149 | p]'IXf`1mMm/MS~> 150 | p]'IXf`1mMm/MS~> 151 | p]'IXf`1mMm/MS~> 152 | p]'IXf`1mMm/MS~> 153 | p]'IXf`1mMm/MS~> 154 | mJm+bcN!hCm/MS~> 155 | mJm+bcN!hCm/MS~> 156 | mJm+bcN!hCm/MS~> 157 | mJm+bcN!hCm/MS~> 158 | mJm+bcN!hCm/MS~> 159 | mJm+bcN!hCm/MS~> 160 | mJm+bcN!hCm/MS~> 161 | mJm+bcN!hCm/MS~> 162 | mJm+bcN!hCm/MS~> 163 | mJm+bp\tTsX'R7b!t-Pd[f6"#$/9nr)@?QZ2/^>,s8;ras*t~> 164 | mJm+bp\tTsX'R7b!t-Pd[f6"#$/9nr)@?QZ2/^>,s8;ras*t~> 165 | mJm+bp\tTsX'R7b!t-Pd[f6"#$/9nr)@?QZ2/^>,s8;ras*t~> 166 | mJm+bq#:Aq*V]U81t2:#!qp@1p](=F[f-6t!;$5@~> 167 | mJm+bq#:Aq*V]U81t2:#!qp@1p](=F[f-6t!;$5@~> 168 | mJm+bq#:Aq*V]U81t2:#!qp@1p](=F[f-6t!;$5@~> 169 | mJm+bqYpTqE:j23%)Dc?!W5@X!<)rh!;$5@~> 170 | mJm+bqYpTqE:j23%)Dc?!W5@X!<)rh!;$5@~> 171 | mJm+bqYpTqE:j23%)Dc?!W5@X!<)rh!;$5@~> 172 | mJm+bqYpP=rW!0*?b5S"jeOC*!!*Yfr;Qbbr;[.#[HID]h5*jJ!<)rh!;$5@~> 173 | mJm+bqYpP=rW!0*?b5S"jeOC*!!*Yfr;Qbbr;[.#[HID]h5*jJ!<)rh!;$5@~> 174 | mJm+bqYpP=rW!0*?b5S"jeOC*!!*Yfr;Qbbr;[.#[HID]h5*jJ!<)rh!;$5@~> 175 | mJm+bqu6Z-rVus1_Ya?6pJ(Ve!(m+g!'1#Y!-.i7!SgBFs8;ras*t~> 176 | mJm+bqu6Z-rVus1_Ya?6pJ(Ve!(m+g!'1#Y!-.i7!SgBFs8;ras*t~> 177 | mJm+bqu6Z-rVus1_Ya?6pJ(Ve!(m+g!'1#Y!-.i7!SgBFs8;ras*t~> 178 | mJm+bqu6XJrVur,q>UKd*<#p 179 | mJm+bqu6XJrVur,q>UKd*<#p 180 | mJm+bqu6XJrVur,q>UKd*<#p 181 | mJm+br;Qc5rVupdp\t5OrVuqDrVlj$rVurpnGiFem/MS~> 182 | mJm+br;Qc5rVupdp\t5OrVuqDrVlj$rVurpnGiFem/MS~> 183 | mJm+br;Qc5rVupdp\t5OrVuqDrVlj$rVurpnGiFem/MS~> 184 | mJm+br;Qb:rVuqhp\t6ArVup]rVlj@rVur6nGiFem/MS~> 185 | mJm+br;Qb:rVuqhp\t6ArVup]rVlj@rVur6nGiFem/MS~> 186 | mJm+br;Qb:rVuqhp\t6ArVup]rVlj@rVur6nGiFem/MS~> 187 | mJm+br;QaXrVurEp\t6brVup8rVlk5rVus?\af^u!:9`9~> 188 | mJm+br;QaXrVurEp\t6brVup8rVlk5rVus?\af^u!:9`9~> 189 | mJm+br;QaXrVurEp\t6brVup8rVlk5rVus?\af^u!:9`9~> 190 | mJm+br;Qa5rW)m!rW<'"qu?^$rVloZ(&\+7+DIk?p&Fsjm/MS~> 191 | mJm+br;Qa5rW)m!rW<'"qu?^$rVloZ(&\+7+DIk?p&Fsjm/MS~> 192 | mJm+br;Qa5rW)m!rW<'"qu?^$rVloZ(&\+7+DIk?p&Fsjm/MS~> 193 | mJm+br;Qa#mK!1b!RiOp!!4Zth"^pJ!:9`9~> 194 | mJm+br;Qa#mK!1b!RiOp!!4Zth"^pJ!:9`9~> 195 | mJm+br;Qa#mK!1b!RiOp!!4Zth"^pJ!:9`9~> 196 | mJm+br;Q`umK!.a"8nua#5\B%!b1]rs8;ras*t~> 197 | mJm+br;Q`umK!.a"8nua#5\B%!b1]rs8;ras*t~> 198 | mJm+br;Q`umK!.a"8nua#5\B%!b1]rs8;ras*t~> 199 | mJm+br;Qa-rVurdl2Ln[^4&-Gr;ZjSp&"df!:9`9~> 200 | mJm+br;Qa-rVurdl2Ln[^4&-Gr;ZjSp&"df!:9`9~> 201 | mJm+br;Qa-rVurdl2Ln[^4&-Gr;ZjSp&"df!:9`9~> 202 | mJm+br;QaMrVur?jo5DHJdD>U!/(1Kr;c3aJ,~> 203 | mJm+br;QaMrVur?jo5DHJdD>U!/(1Kr;c3aJ,~> 204 | mJm+br;QaMrVur?jo5DHJdD>U!/(1Kr;c3aJ,~> 205 | mJm+br;Qb-rVuqOj8T+NrVupKqu?Tpm/MS~> 206 | mJm+br;Qb-rVuqOj8T+NrVupKqu?Tpm/MS~> 207 | mJm+br;Qb-rVuqOj8T+NrVupKqu?Tpm/MS~> 208 | mJm+br;Qc'rVusAq;hPUoDS^i#lFW%"o\K%r9aN7~> 209 | mJm+br;Qc'rVusAq;hPUoDS^i#lFW%"o\K%r9aN7~> 210 | mJm+br;Qc'rVusAq;hPUoDS^i#lFW%"o\K%r9aN7~> 211 | mJm+br;Qfq,5qQBHK>)+l2CY_%/^&)'E.t3lL"V%~> 212 | mJm+br;Qfq,5qQBHK>)+l2CY_%/^&)'E.t3lL"V%~> 213 | mJm+br;Qfq,5qQBHK>)+l2CY_%/^&)'E.t3lL"V%~> 214 | mJm+bqu6Z#r;ZkIr:p9m]L)Pr!^XEsq>UG:rVup]qu6XTrVur+mJh\~> 215 | mJm+bqu6Z#r;ZkIr:p9m]L)Pr!^XEsq>UG:rVup]qu6XTrVur+mJh\~> 216 | mJm+bqu6Z#r;ZkIr:p9m]L)Pr!^XEsq>UG:rVup]qu6XTrVur+mJh\~> 217 | mJm+bqYpP8r;[3PNR%"in(Ojb,6.`As8N'),':6Oq>BHb:]17nW;HSpFoD@C-bJmInGe"~> 218 | mJm+bqYpP8r;[3PNR%"in(Ojb,6.`As8N'),':6Oq>BHb:]17nW;HSpFoD@C-bJmInGe"~> 219 | mJm+bqYpP8r;[3PNR%"in(Ojb,6.`As8N'),':6Oq>BHb:]17nW;HSpFoD@C-bJmInGe"~> 220 | mJm+bqYpTqFn,P1s763j@J^!)g'7 221 | mJm+bqYpTqFn,P1s763j@J^!)g'7 222 | mJm+bqYpTqFn,P1s763j@J^!)g'7 223 | mJm+bq#:B(.e`oE"B!/9s7H?n%Z^ParrJo%q#L$dJ,~> 224 | mJm+bq#:B(.e`oE"B!/9s7H?n%Z^ParrJo%q#L$dJ,~> 225 | mJm+bq#:B(.e`oE"B!/9s7H?n%Z^ParrJo%q#L$dJ,~> 226 | mJm+bp\tX#]l#bD"9T5g>b:46Q6C6rW)QiJ,~> 227 | mJm+bp\tX#]l#bD"9T5g>b:46Q6C6rW)QiJ,~> 228 | mJm+bp\tX#]l#bD"9T5g>b:46Q6C6rW)QiJ,~> 229 | Sc=3~> 230 | Sc=3~> 231 | Sc=3~> 232 | Sc=3~> 233 | Sc=3~> 234 | Sc=3~> 235 | Sc=3~> 236 | Sc=3~> 237 | Sc=3~> 238 | Sc=3~> 239 | Sc=3~> 240 | Sc=3~> 241 | Sc=3~> 242 | Sc=3~> 243 | Sc=3~> 244 | Sc=3~> 245 | Sc=3~> 246 | Sc=3~> 247 | Sc=3~> 248 | Sc=3~> 249 | Sc=3~> 250 | Sc=3~> 251 | Sc=3~> 252 | Sc=3~> 253 | Sc=3~> 254 | Sc=3~> 255 | Sc=3~> 256 | Sc=3~> 257 | Sc=3~> 258 | Sc=3~> 259 | Sc=3~> 260 | Sc=3~> 261 | Sc=3~> 262 | Sc=3~> 263 | Sc=3~> 264 | Sc=3~> 265 | Sc=3~> 266 | Sc=3~> 267 | Sc=3~> 268 | Sc=3~> 269 | Sc=3~> 270 | Sc=3~> 271 | Sc=3~> 272 | Sc=3~> 273 | Sc=3~> 274 | Sc=3~> 275 | Sc=3~> 276 | Sc=3~> 277 | Sc=3~> 278 | Sc=3~> 279 | Sc=3~> 280 | Sc=3~> 281 | Sc=3~> 282 | Sc=3~> 283 | Sc=3~> 284 | Sc=3~> 285 | Sc=3~> 286 | Sc=3~> 287 | Sc=3~> 288 | Sc=3~> 289 | Sc=3~> 290 | Sc=3~> 291 | Sc=3~> 292 | Sc=3~> 293 | Sc=3~> 294 | Sc=3~> 295 | Sc=3~> 296 | Sc=3~> 297 | Sc=3~> 298 | Sc=3~> 299 | Sc=3~> 300 | Sc=3~> 301 | Sc=3~> 302 | Sc=3~> 303 | Sc=3~> 304 | Sc=3~> 305 | Sc=3~> 306 | Sc=3~> 307 | Sc=3~> 308 | Sc=3~> 309 | Sc=3~> 310 | Sc=3~> 311 | Sc=3~> 312 | Sc=3~> 313 | Sc=3~> 314 | Sc=3~> 315 | Sc=3~> 316 | Sc=3~> 317 | Sc=3~> 318 | Sc=3~> 319 | Sc=3~> 320 | Sc=3~> 321 | Sc=3~> 322 | Sc=3~> 323 | Sc=3~> 324 | Sc=3~> 325 | Sc=3~> 326 | Sc=3~> 327 | Sc=3~> 328 | Sc=3~> 329 | Sc=3~> 330 | Sc=3~> 331 | Sc=3~> 332 | Sc=3~> 333 | Sc=3~> 334 | %%EndData 335 | showpage 336 | %%Trailer 337 | end 338 | %%EOF 339 | -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.tar: -------------------------------------------------------------------------------- 1 | test.txt0100644000175000001440000000003210063737375012024 0ustar arimususersThis is a plain text file 2 | -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.py: -------------------------------------------------------------------------------- 1 | """Append module search paths for third-party packages to sys.path. 2 | 3 | **************************************************************** 4 | * This module is automatically imported during initialization. * 5 | **************************************************************** 6 | 7 | In earlier versions of Python (up to 1.5a3), scripts or modules that 8 | needed to use site-specific modules would place ``import site'' 9 | somewhere near the top of their code. Because of the automatic 10 | import, this is no longer necessary (but code that does it still 11 | works). 12 | 13 | This will append site-specific paths to to the module search path. On 14 | Unix, it starts with sys.prefix and sys.exec_prefix (if different) and 15 | appends lib/python/site-packages as well as lib/site-python. 16 | On other platforms (mainly Mac and Windows), it uses just sys.prefix 17 | (and sys.exec_prefix, if different, but this is unlikely). The 18 | resulting directories, if they exist, are appended to sys.path, and 19 | also inspected for path configuration files. 20 | 21 | FOR DEBIAN, this sys.path is augmented with directories in /usr/local. 22 | Local addons go into /usr/local/lib/python/site-packages 23 | (resp. /usr/local/lib/site-python), Debian addons install into 24 | /usr/{lib,share}/python/site-packages. 25 | 26 | A path configuration file is a file whose name has the form 27 | .pth; its contents are additional directories (one per line) 28 | to be added to sys.path. Non-existing directories (or 29 | non-directories) are never added to sys.path; no directory is added to 30 | sys.path more than once. Blank lines and lines beginning with 31 | '#' are skipped. Lines starting with 'import' are executed. 32 | 33 | For example, suppose sys.prefix and sys.exec_prefix are set to 34 | /usr/local and there is a directory /usr/local/lib/python2.3/site-packages 35 | with three subdirectories, foo, bar and spam, and two path 36 | configuration files, foo.pth and bar.pth. Assume foo.pth contains the 37 | following: 38 | 39 | # foo package configuration 40 | foo 41 | bar 42 | bletch 43 | 44 | and bar.pth contains: 45 | 46 | # bar package configuration 47 | bar 48 | 49 | Then the following directories are added to sys.path, in this order: 50 | 51 | /usr/local/lib/python2.3/site-packages/bar 52 | /usr/local/lib/python2.3/site-packages/foo 53 | 54 | Note that bletch is omitted because it doesn't exist; bar precedes foo 55 | because bar.pth comes alphabetically before foo.pth; and spam is 56 | omitted because it is not mentioned in either path configuration file. 57 | 58 | After these path manipulations, an attempt is made to import a module 59 | named sitecustomize, which can perform arbitrary additional 60 | site-specific customizations. If this import fails with an 61 | ImportError exception, it is silently ignored. 62 | 63 | """ 64 | 65 | import sys, os 66 | 67 | 68 | def makepath(*paths): 69 | dir = os.path.abspath(os.path.join(*paths)) 70 | return dir, os.path.normcase(dir) 71 | 72 | for m in sys.modules.values(): 73 | if hasattr(m, "__file__") and m.__file__: 74 | m.__file__ = os.path.abspath(m.__file__) 75 | del m 76 | 77 | # This ensures that the initial path provided by the interpreter contains 78 | # only absolute pathnames, even if we're running from the build directory. 79 | L = [] 80 | _dirs_in_sys_path = {} 81 | dir = dircase = None # sys.path may be empty at this point 82 | for dir in sys.path: 83 | # Filter out duplicate paths (on case-insensitive file systems also 84 | # if they only differ in case); turn relative paths into absolute 85 | # paths. 86 | dir, dircase = makepath(dir) 87 | if not dircase in _dirs_in_sys_path: 88 | L.append(dir) 89 | _dirs_in_sys_path[dircase] = 1 90 | sys.path[:] = L 91 | del dir, dircase, L 92 | 93 | # Append ./build/lib. in case we're running in the build dir 94 | # (especially for Guido :-) 95 | # XXX This should not be part of site.py, since it is needed even when 96 | # using the -S option for Python. See http://www.python.org/sf/586680 97 | if (os.name == "posix" and sys.path and 98 | os.path.basename(sys.path[-1]) == "Modules"): 99 | from distutils.util import get_platform 100 | s = "build/lib.%s-%.3s" % (get_platform(), sys.version) 101 | s = os.path.join(os.path.dirname(sys.path[-1]), s) 102 | sys.path.append(s) 103 | del get_platform, s 104 | 105 | def _init_pathinfo(): 106 | global _dirs_in_sys_path 107 | _dirs_in_sys_path = d = {} 108 | for dir in sys.path: 109 | if dir and not os.path.isdir(dir): 110 | continue 111 | dir, dircase = makepath(dir) 112 | d[dircase] = 1 113 | 114 | def addsitedir(sitedir): 115 | global _dirs_in_sys_path 116 | if _dirs_in_sys_path is None: 117 | _init_pathinfo() 118 | reset = 1 119 | else: 120 | reset = 0 121 | sitedir, sitedircase = makepath(sitedir) 122 | if not sitedircase in _dirs_in_sys_path: 123 | sys.path.append(sitedir) # Add path component 124 | try: 125 | names = os.listdir(sitedir) 126 | except os.error: 127 | return 128 | names.sort() 129 | for name in names: 130 | if name[-4:] == os.extsep + "pth": 131 | addpackage(sitedir, name) 132 | if reset: 133 | _dirs_in_sys_path = None 134 | 135 | def addpackage(sitedir, name): 136 | global _dirs_in_sys_path 137 | if _dirs_in_sys_path is None: 138 | _init_pathinfo() 139 | reset = 1 140 | else: 141 | reset = 0 142 | fullname = os.path.join(sitedir, name) 143 | try: 144 | f = open(fullname) 145 | except IOError: 146 | return 147 | while 1: 148 | dir = f.readline() 149 | if not dir: 150 | break 151 | if dir[0] == '#': 152 | continue 153 | if dir.startswith("import"): 154 | exec dir 155 | continue 156 | if dir[-1] == '\n': 157 | dir = dir[:-1] 158 | dir, dircase = makepath(sitedir, dir) 159 | if not dircase in _dirs_in_sys_path and os.path.exists(dir): 160 | sys.path.append(dir) 161 | _dirs_in_sys_path[dircase] = 1 162 | if reset: 163 | _dirs_in_sys_path = None 164 | 165 | prefixes = [os.path.join(sys.prefix, "local"), sys.prefix] 166 | sitedir = None # make sure sitedir is initialized because of later 'del' 167 | if sys.exec_prefix != sys.prefix: 168 | prefixes.append(os.path.join(sys.exec_prefix, "local")) 169 | for prefix in prefixes: 170 | if prefix: 171 | if sys.platform in ('os2emx', 'riscos'): 172 | sitedirs = [os.path.join(prefix, "Lib", "site-packages")] 173 | elif os.sep == '/': 174 | sitedirs = [os.path.join(prefix, 175 | "lib", 176 | "python" + sys.version[:3], 177 | "site-packages"), 178 | os.path.join(prefix, "lib", "site-python")] 179 | else: 180 | sitedirs = [prefix, os.path.join(prefix, "lib", "site-packages")] 181 | if sys.platform == 'darwin': 182 | # for framework builds *only* we add the standard Apple 183 | # locations. Currently only per-user, but /Library and 184 | # /Network/Library could be added too 185 | if 'Python.framework' in prefix: 186 | home = os.environ.get('HOME') 187 | if home: 188 | sitedirs.append( 189 | os.path.join(home, 190 | 'Library', 191 | 'Python', 192 | sys.version[:3], 193 | 'site-packages')) 194 | for sitedir in sitedirs: 195 | if os.path.isdir(sitedir): 196 | addsitedir(sitedir) 197 | del prefix, sitedir 198 | 199 | _dirs_in_sys_path = None 200 | 201 | 202 | # Define new built-ins 'quit' and 'exit'. 203 | # These are simply strings that display a hint on how to exit. 204 | if os.sep == ':': 205 | exit = 'Use Cmd-Q to quit.' 206 | elif os.sep == '\\': 207 | exit = 'Use Ctrl-Z plus Return to exit.' 208 | else: 209 | exit = 'Use Ctrl-D (i.e. EOF) to exit.' 210 | import __builtin__ 211 | __builtin__.quit = __builtin__.exit = exit 212 | del exit 213 | 214 | # interactive prompt objects for printing the license text, a list of 215 | # contributors and the copyright notice. 216 | class _Printer: 217 | MAXLINES = 23 218 | 219 | def __init__(self, name, data, files=(), dirs=()): 220 | self.__name = name 221 | self.__data = data 222 | self.__files = files 223 | self.__dirs = dirs 224 | self.__lines = None 225 | 226 | def __setup(self): 227 | if self.__lines: 228 | return 229 | data = None 230 | for dir in self.__dirs: 231 | for file in self.__files: 232 | file = os.path.join(dir, file) 233 | try: 234 | fp = open(file) 235 | data = fp.read() 236 | fp.close() 237 | break 238 | except IOError: 239 | pass 240 | if data: 241 | break 242 | if not data: 243 | data = self.__data 244 | self.__lines = data.split('\n') 245 | self.__linecnt = len(self.__lines) 246 | 247 | def __repr__(self): 248 | self.__setup() 249 | if len(self.__lines) <= self.MAXLINES: 250 | return "\n".join(self.__lines) 251 | else: 252 | return "Type %s() to see the full %s text" % ((self.__name,)*2) 253 | 254 | def __call__(self): 255 | self.__setup() 256 | prompt = 'Hit Return for more, or q (and Return) to quit: ' 257 | lineno = 0 258 | while 1: 259 | try: 260 | for i in range(lineno, lineno + self.MAXLINES): 261 | print self.__lines[i] 262 | except IndexError: 263 | break 264 | else: 265 | lineno += self.MAXLINES 266 | key = None 267 | while key is None: 268 | key = raw_input(prompt) 269 | if key not in ('', 'q'): 270 | key = None 271 | if key == 'q': 272 | break 273 | 274 | __builtin__.copyright = _Printer("copyright", sys.copyright) 275 | if sys.platform[:4] == 'java': 276 | __builtin__.credits = _Printer( 277 | "credits", 278 | "Jython is maintained by the Jython developers (www.jython.org).") 279 | else: 280 | __builtin__.credits = _Printer("credits", """\ 281 | Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands 282 | for supporting Python development. See www.python.org for more information.""") 283 | here = os.path.dirname(os.__file__) 284 | __builtin__.license = _Printer( 285 | "license", "See http://www.python.org/%.3s/license.html" % sys.version, 286 | ["LICENSE.txt", "LICENSE"], 287 | [os.path.join(here, os.pardir), here, os.curdir]) 288 | 289 | 290 | # Define new built-in 'help'. 291 | # This is a wrapper around pydoc.help (with a twist). 292 | 293 | class _Helper: 294 | def __repr__(self): 295 | return "Type help() for interactive help, " \ 296 | "or help(object) for help about object." 297 | def __call__(self, *args, **kwds): 298 | import pydoc 299 | return pydoc.help(*args, **kwds) 300 | 301 | __builtin__.help = _Helper() 302 | 303 | 304 | # On Windows, some default encodings are not provided 305 | # by Python (e.g. "cp932" in Japanese locale), while they 306 | # are always available as "mbcs" in each locale. 307 | # Make them usable by aliasing to "mbcs" in such a case. 308 | 309 | if sys.platform == 'win32': 310 | import locale, codecs 311 | enc = locale.getdefaultlocale()[1] 312 | if enc.startswith('cp'): # "cp***" ? 313 | try: 314 | codecs.lookup(enc) 315 | except LookupError: 316 | import encodings 317 | encodings._cache[enc] = encodings._unknown 318 | encodings.aliases.aliases[enc] = 'mbcs' 319 | 320 | # Set the string encoding used by the Unicode implementation. The 321 | # default is 'ascii', but if you're willing to experiment, you can 322 | # change this. 323 | 324 | encoding = "ascii" # Default value set by _PyUnicode_Init() 325 | 326 | if 0: 327 | # Enable to support locale aware default string encodings. 328 | import locale 329 | loc = locale.getdefaultlocale() 330 | if loc[1]: 331 | encoding = loc[1] 332 | 333 | if 0: 334 | # Enable to switch off string to Unicode coercion and implicit 335 | # Unicode to string conversion. 336 | encoding = "undefined" 337 | 338 | if encoding != "ascii": 339 | # On Non-Unicode builds this will raise an AttributeError... 340 | sys.setdefaultencoding(encoding) # Needs Python Unicode build ! 341 | 342 | # 343 | # Run custom site specific code, if available. 344 | # 345 | try: 346 | import sitecustomize 347 | except ImportError: 348 | pass 349 | 350 | # 351 | # Remove sys.setdefaultencoding() so that users cannot change the 352 | # encoding after initialization. The test for presence is needed when 353 | # this module is run as a script, because this code is executed twice. 354 | # 355 | if hasattr(sys, "setdefaultencoding"): 356 | del sys.setdefaultencoding 357 | 358 | def _test(): 359 | print "sys.path = [" 360 | for dir in sys.path: 361 | print " %s," % `dir` 362 | print "]" 363 | 364 | if __name__ == '__main__': 365 | _test() 366 | -------------------------------------------------------------------------------- /inst/extdat/pass-through/test.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * test_xpm[] = { 3 | "100 100 152 2", 4 | " c #FFFFFF", 5 | ". c #000000", 6 | "+ c #FAFAFA", 7 | "@ c #ABABAB", 8 | "# c #5E5E5E", 9 | "$ c #2A2A2A", 10 | "% c #0D0D0D", 11 | "& c #030303", 12 | "* c #0B0B0B", 13 | "= c #292929", 14 | "- c #616161", 15 | "; c #B6B6B6", 16 | "> c #FEFEFE", 17 | ", c #DBDBDB", 18 | "' c #7E7E7E", 19 | ") c #434343", 20 | "! c #1A1A1A", 21 | "~ c #0A0A0A", 22 | "{ c #121212", 23 | "] c #353535", 24 | "^ c #6E6E6E", 25 | "/ c #C3C3C3", 26 | "( c #1D1D1D", 27 | "_ c #343434", 28 | ": c #D3D3D3", 29 | "< c #F6F6F6", 30 | "[ c #6A6A6A", 31 | "} c #020202", 32 | "| c #2B2B2B", 33 | "1 c #707070", 34 | "2 c #0C0C0C", 35 | "3 c #C0C0C0", 36 | "4 c #FCFCFC", 37 | "5 c #444444", 38 | "6 c #767676", 39 | "7 c #5F5F5F", 40 | "8 c #BABABA", 41 | "9 c #EBEBEB", 42 | "0 c #E5E5E5", 43 | "a c #A4A4A4", 44 | "b c #101010", 45 | "c c #DEDEDE", 46 | "d c #999999", 47 | "e c #505050", 48 | "f c #B5B5B5", 49 | "g c #E7E7E7", 50 | "h c #F8F8F8", 51 | "i c #DDDDDD", 52 | "j c #A5A5A5", 53 | "k c #4E4E4E", 54 | "l c #C2C2C2", 55 | "m c #F7F7F7", 56 | "n c #4D4D4D", 57 | "o c #494949", 58 | "p c #393939", 59 | "q c #717171", 60 | "r c #DCDCDC", 61 | "s c #4C4C4C", 62 | "t c #2D2D2D", 63 | "u c #F2F2F2", 64 | "v c #1C1C1C", 65 | "w c #D0D0D0", 66 | "x c #C1C1C1", 67 | "y c #8B8B8B", 68 | "z c #797979", 69 | "A c #050505", 70 | "B c #9D9D9D", 71 | "C c #D2D2D2", 72 | "D c #3D3D3D", 73 | "E c #212121", 74 | "F c #3A3A3A", 75 | "G c #CFCFCF", 76 | "H c #F3F3F3", 77 | "I c #181818", 78 | "J c #6B6B6B", 79 | "K c #1E1E1E", 80 | "L c #B9B9B9", 81 | "M c #171717", 82 | "N c #010101", 83 | "O c #060606", 84 | "P c #E4E4E4", 85 | "Q c #151515", 86 | "R c #202020", 87 | "S c #696969", 88 | "T c #AAAAAA", 89 | "U c #E9E9E9", 90 | "V c #7B7B7B", 91 | "W c #454545", 92 | "X c #626262", 93 | "Y c #F1F1F1", 94 | "Z c #0F0F0F", 95 | "` c #EEEEEE", 96 | " . c #BEBEBE", 97 | ".. c #3B3B3B", 98 | "+. c #333333", 99 | "@. c #F5F5F5", 100 | "#. c #2F2F2F", 101 | "$. c #C9C9C9", 102 | "%. c #828282", 103 | "&. c #080808", 104 | "*. c #838383", 105 | "=. c #646464", 106 | "-. c #848484", 107 | ";. c #9E9E9E", 108 | ">. c #B3B3B3", 109 | ",. c #F9F9F9", 110 | "'. c #222222", 111 | "). c #7A7A7A", 112 | "!. c #131313", 113 | "~. c #EAEAEA", 114 | "{. c #B0B0B0", 115 | "]. c #BCBCBC", 116 | "^. c #424242", 117 | "/. c #414141", 118 | "(. c #747474", 119 | "_. c #373737", 120 | ":. c #262626", 121 | "<. c #8D8D8D", 122 | "[. c #CECECE", 123 | "}. c #EFEFEF", 124 | "|. c #FBFBFB", 125 | "1. c #DADADA", 126 | "2. c #ACACAC", 127 | "3. c #232323", 128 | "4. c #E1E1E1", 129 | "5. c #E8E8E8", 130 | "6. c #4F4F4F", 131 | "7. c #A8A8A8", 132 | "8. c #757575", 133 | "9. c #272727", 134 | "0. c #BBBBBB", 135 | "a. c #F0F0F0", 136 | "b. c #B7B7B7", 137 | "c. c #040404", 138 | "d. c #515151", 139 | "e. c #C5C5C5", 140 | "f. c #0E0E0E", 141 | "g. c #8E8E8E", 142 | "h. c #090909", 143 | "i. c #BDBDBD", 144 | "j. c #111111", 145 | "k. c #2E2E2E", 146 | "l. c #5C5C5C", 147 | "m. c #ECECEC", 148 | "n. c #E3E3E3", 149 | "o. c #787878", 150 | "p. c #141414", 151 | "q. c #070707", 152 | "r. c #545454", 153 | "s. c #9A9A9A", 154 | "t. c #E0E0E0", 155 | "u. c #1B1B1B", 156 | " ", 157 | " ", 158 | " ", 159 | " ", 160 | " ", 161 | " ", 162 | " ", 163 | " ", 164 | " ", 165 | " ", 166 | " ", 167 | " ", 168 | " ", 169 | " ", 170 | " ", 171 | " ", 172 | " ", 173 | " ", 174 | " ", 175 | " ", 176 | " ", 177 | " ", 178 | " ", 179 | " ", 180 | " ", 181 | " ", 182 | " ", 183 | " ", 184 | " ", 185 | " ", 186 | " ", 187 | " ", 188 | " ", 189 | " ", 190 | " ", 191 | " ", 192 | " ", 193 | " . . . . . . . . . . . . . . . . . . . . . . . . ", 194 | " . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", 195 | " . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", 196 | " . . . . . . . . ", 197 | " . . . . . . . . ", 198 | " . . . . . . . . ", 199 | " . . . . + @ # $ % & * = - ; > , ' ) ! ~ & { ] ^ / . . . . ", 200 | " . . . . @ ( . . . . . . . . . _ : < [ } . . . . . . . . . | ; . . . . . . . . . . . . . . ", 201 | " . . . . > 1 . . . . . . . . . . . . 2 3 4 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . ", 202 | " . . . . 6 . . . & 7 8 9 + 0 a $ . . . b c d . . . . e f g + h i j k } . . . . . . . . . . . . . . . ", 203 | " . . . . 8 . . . b l m n . . . o p . . . q r s . . . . ", 204 | " . . . . t . . . ; u v . . . w * . . . 0 . . . . ", 205 | " . . . . x . . . 5 y . . . z A . . . + . . . . ", 206 | " . . . . q . . . B C . . . D E . . . 3 . . . . ", 207 | " . . . . F . . . G H . . . I J . . . K L . . . . ", 208 | " . . . . M . . . & & & & } } } N N N . . . . . O P Q . . . . R S T U . . . . ", 209 | " . . . . A . . . . . . . . . . . . . . . . . . . : $ . . . . . . . | V r . . . . ", 210 | " . . . . } . . . . . . . . . . . . . . . . . . . 4 j W O . . . . . . } X Y . . . . ", 211 | " . . . . Z . . . ` < .' ..& . . . . +.@. . . . . ", 212 | " . . . . #.. . . $. U %.&.. . . *. . . . . ", 213 | " . . . . =.. . . -. ;.. . . | . . . . ", 214 | " . . . . >.. . . R ,. H . . . &. A . . . 4 ", 215 | " . . . . 4 '.. . . ). U . . . 2 !.. . . ~. ", 216 | " . . . . {.. . . . ' 4 ].^. /.8 > (.. . . D _.. . . f ", 217 | " . . . . q . . . . :.<.[.}.|.}.1.2.(.3.. . . . '.(.f 4.,.4 5.; 6.. . . . 7. 8.. . . 9.0.a.> ", 218 | " . . . . > 8.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . - 1.O . . . . . . . . . ", 219 | " . . . . b.$ . . . . . . . . . . c.d.e. . . . . . . . . . . . . f.g.> a h.. . . . . . . . ", 220 | " . . . . > i.^ _.Q c.& j.k.l.;.m. n.T o.k t p.q.& f.:.r.s.` t.%.) u.* N . . . ", 221 | " ", 222 | " ", 223 | " ", 224 | " ", 225 | " ", 226 | " ", 227 | " ", 228 | " ", 229 | " ", 230 | " ", 231 | " ", 232 | " ", 233 | " ", 234 | " ", 235 | " ", 236 | " ", 237 | " ", 238 | " ", 239 | " ", 240 | " ", 241 | " ", 242 | " ", 243 | " ", 244 | " ", 245 | " ", 246 | " ", 247 | " ", 248 | " ", 249 | " ", 250 | " ", 251 | " ", 252 | " ", 253 | " ", 254 | " ", 255 | " "}; 256 | -------------------------------------------------------------------------------- /tools/orig-db.csv: -------------------------------------------------------------------------------- 1 | extension,mime_type 2 | pyc,application/x-bytecode.python 3 | dwg,application/acad 4 | ez,application/andrew-inset 5 | aw,application/applixware 6 | arj,application/arj 7 | atom,application/atom+xml 8 | xml,application/atom+xml 9 | atomcat,application/atomcat+xml 10 | atomsvc,application/atomsvc+xml 11 | mm,application/base64 12 | mme,application/base64 13 | hqx,application/binhex 14 | hqx,application/binhex4 15 | boo,application/book 16 | book,application/book 17 | ccxml,application/ccxml+xml 18 | cdf,application/cdf 19 | cdmia,application/cdmi-capability 20 | cdmic,application/cdmi-container 21 | cdmid,application/cdmi-domain 22 | cdmio,application/cdmi-object 23 | cdmiq,application/cdmi-queue 24 | ccad,application/clariscad 25 | dp,application/commonground 26 | cu,application/cu-seeme 27 | csm,application/cu-seeme 28 | davmount,application/davmount+xml 29 | dbk,application/docbook+xml 30 | drw,application/drafting 31 | tsp,application/dsptype 32 | dssc,application/dssc+der 33 | xdssc,application/dssc+xml 34 | dxf,application/dxf 35 | es,application/ecmascript 36 | ecma,application/ecmascript 37 | js,application/ecmascript 38 | emma,application/emma+xml 39 | evy,application/envoy 40 | epub,application/epub+zip 41 | xl,application/excel 42 | xla,application/excel 43 | xlb,application/excel 44 | xlc,application/excel 45 | xld,application/excel 46 | xlk,application/excel 47 | xll,application/excel 48 | xlm,application/excel 49 | xls,application/excel 50 | xlt,application/excel 51 | xlv,application/excel 52 | xlw,application/excel 53 | exi,application/exi 54 | pfr,application/font-tdpfr 55 | woff,application/font-woff 56 | fif,application/fractals 57 | frl,application/freeloader 58 | spl,application/futuresplash 59 | gml,application/gml+xml 60 | tgz,application/gnutar 61 | gpx,application/gpx+xml 62 | vew,application/groupwise 63 | gxf,application/gxf 64 | hlp,application/hlp 65 | hta,application/hta 66 | stk,application/hyperstudio 67 | unv,application/i-deas 68 | iges,application/iges 69 | igs,application/iges 70 | inf,application/inf 71 | ink,application/inkml+xml 72 | inkml,application/inkml+xml 73 | acx,application/internet-property-stream 74 | ipfix,application/ipfix 75 | class,application/java 76 | jar,application/java-archive 77 | class,application/java-byte-code 78 | ser,application/java-serialized-object 79 | class,application/java-vm 80 | js,application/javascript 81 | json,application/json 82 | jsonml,application/jsonml+json 83 | lha,application/lha 84 | lostxml,application/lost+xml 85 | lzx,application/lzx 86 | bin,application/mac-binary 87 | hqx,application/mac-binhex 88 | hqx,application/mac-binhex40 89 | cpt,application/mac-compactpro 90 | bin,application/macbinary 91 | mads,application/mads+xml 92 | mrc,application/marc 93 | mrcx,application/marcxml+xml 94 | ma,application/mathematica 95 | nb,application/mathematica 96 | mb,application/mathematica 97 | mathml,application/mathml+xml 98 | mbd,application/mbedlet 99 | mbox,application/mbox 100 | mcd,application/mcad 101 | mscml,application/mediaservercontrol+xml 102 | metalink,application/metalink+xml 103 | meta4,application/metalink4+xml 104 | mets,application/mets+xml 105 | aps,application/mime 106 | mods,application/mods+xml 107 | m21,application/mp21 108 | mp21,application/mp21 109 | mp4,application/mp4 110 | m4p,application/mp4 111 | mp4s,application/mp4 112 | mdb,application/msaccess 113 | one,application/msonenote 114 | onetoc2,application/msonenote 115 | onetmp,application/msonenote 116 | onepkg,application/msonenote 117 | pot,application/mspowerpoint 118 | pps,application/mspowerpoint 119 | ppt,application/mspowerpoint 120 | ppz,application/mspowerpoint 121 | doc,application/msword 122 | dot,application/msword 123 | w6w,application/msword 124 | wiz,application/msword 125 | word,application/msword 126 | wri,application/mswrite 127 | mxf,application/mxf 128 | mcp,application/netmc 129 | bin,application/octet-stream 130 | dms,application/octet-stream 131 | lrf,application/octet-stream 132 | mar,application/octet-stream 133 | so,application/octet-stream 134 | dist,application/octet-stream 135 | distz,application/octet-stream 136 | pkg,application/octet-stream 137 | bpk,application/octet-stream 138 | dump,application/octet-stream 139 | elc,application/octet-stream 140 | a,application/octet-stream 141 | arc,application/octet-stream 142 | arj,application/octet-stream 143 | com,application/octet-stream 144 | exe,application/octet-stream 145 | lha,application/octet-stream 146 | lhx,application/octet-stream 147 | lzh,application/octet-stream 148 | lzx,application/octet-stream 149 | o,application/octet-stream 150 | psd,application/octet-stream 151 | saveme,application/octet-stream 152 | uu,application/octet-stream 153 | zoo,application/octet-stream 154 | class,application/octet-stream 155 | buffer,application/octet-stream 156 | deploy,application/octet-stream 157 | hqx,application/octet-stream 158 | obj,application/octet-stream 159 | lib,application/octet-stream 160 | zip,application/octet-stream 161 | gz,application/octet-stream 162 | dmg,application/octet-stream 163 | iso,application/octet-stream 164 | oda,application/oda 165 | opf,application/oebps-package+xml 166 | ogx,application/ogg 167 | ogg,application/ogg 168 | axs,application/olescript 169 | omdoc,application/omdoc+xml 170 | onetoc,application/onenote 171 | onetoc2,application/onenote 172 | onetmp,application/onenote 173 | onepkg,application/onenote 174 | oxps,application/oxps 175 | xer,application/patch-ops-error+xml 176 | pdf,application/pdf 177 | pgp,application/pgp-encrypted 178 | key,application/pgp-keys 179 | asc,application/pgp-signature 180 | pgp,application/pgp-signature 181 | sig,application/pgp-signature 182 | prf,application/pics-rules 183 | p12,application/pkcs-12 184 | crl,application/pkcs-crl 185 | p10,application/pkcs10 186 | p7m,application/pkcs7-mime 187 | p7c,application/pkcs7-mime 188 | p7s,application/pkcs7-signature 189 | p8,application/pkcs8 190 | ac,application/pkix-attr-cert 191 | cer,application/pkix-cert 192 | crt,application/pkix-cert 193 | crl,application/pkix-crl 194 | pkipath,application/pkix-pkipath 195 | pki,application/pkixcmp 196 | text,application/plain 197 | pls,application/pls+xml 198 | ai,application/postscript 199 | eps,application/postscript 200 | ps,application/postscript 201 | ppt,application/powerpoint 202 | part,application/pro_eng 203 | prt,application/pro_eng 204 | cww,application/prs.cww 205 | pskcxml,application/pskc+xml 206 | rar,application/rar 207 | rdf,application/rdf+xml 208 | rif,application/reginfo+xml 209 | rnc,application/relax-ng-compact-syntax 210 | rl,application/resource-lists+xml 211 | rld,application/resource-lists-diff+xml 212 | rng,application/ringing-tones 213 | rs,application/rls-services+xml 214 | gbr,application/rpki-ghostbusters 215 | mft,application/rpki-manifest 216 | roa,application/rpki-roa 217 | rsd,application/rsd+xml 218 | rss,application/rss+xml 219 | xml,application/rss+xml 220 | rtf,application/rtf 221 | rtx,application/rtf 222 | sbml,application/sbml+xml 223 | scq,application/scvp-cv-request 224 | scs,application/scvp-cv-response 225 | spq,application/scvp-vp-request 226 | spp,application/scvp-vp-response 227 | sdp,application/sdp 228 | sea,application/sea 229 | set,application/set 230 | setpay,application/set-payment-initiation 231 | setreg,application/set-registration-initiation 232 | shf,application/shf+xml 233 | stl,application/sla 234 | smi,application/smil 235 | smil,application/smil 236 | smi,application/smil+xml 237 | smil,application/smil+xml 238 | sol,application/solids 239 | sdr,application/sounder 240 | rq,application/sparql-query 241 | srx,application/sparql-results+xml 242 | gram,application/srgs 243 | grxml,application/srgs+xml 244 | sru,application/sru+xml 245 | ssdl,application/ssdl+xml 246 | ssml,application/ssml+xml 247 | step,application/step 248 | stp,application/step 249 | ssm,application/streamingmedia 250 | tei,application/tei+xml 251 | teicorpus,application/tei+xml 252 | tfi,application/thraud+xml 253 | tsd,application/timestamped-data 254 | tbk,application/toolbook 255 | vda,application/vda 256 | plb,application/vnd.3gpp.pic-bw-large 257 | psb,application/vnd.3gpp.pic-bw-small 258 | pvb,application/vnd.3gpp.pic-bw-var 259 | tcap,application/vnd.3gpp2.tcap 260 | pwn,application/vnd.3m.post-it-notes 261 | aso,application/vnd.accpac.simply.aso 262 | imp,application/vnd.accpac.simply.imp 263 | acu,application/vnd.acucobol 264 | atc,application/vnd.acucorp 265 | acutc,application/vnd.acucorp 266 | air,application/vnd.adobe.air-application-installer-package+zip 267 | fcdt,application/vnd.adobe.formscentral.fcdt 268 | fxp,application/vnd.adobe.fxp 269 | fxpl,application/vnd.adobe.fxp 270 | xdp,application/vnd.adobe.xdp+xml 271 | xfdf,application/vnd.adobe.xfdf 272 | ahead,application/vnd.ahead.space 273 | azf,application/vnd.airzip.filesecure.azf 274 | azs,application/vnd.airzip.filesecure.azs 275 | azw,application/vnd.amazon.ebook 276 | acc,application/vnd.americandynamics.acc 277 | ami,application/vnd.amiga.ami 278 | apk,application/vnd.android.package-archive 279 | cii,application/vnd.anser-web-certificate-issue-initiation 280 | fti,application/vnd.anser-web-funds-transfer-initiation 281 | atx,application/vnd.antix.game-component 282 | mpkg,application/vnd.apple.installer+xml 283 | m3u8,application/vnd.apple.mpegurl 284 | swi,application/vnd.arastra.swi 285 | swi,application/vnd.aristanetworks.swi 286 | iota,application/vnd.astraea-software.iota 287 | aep,application/vnd.audiograph 288 | mpm,application/vnd.blueice.multipass 289 | bmi,application/vnd.bmi 290 | rep,application/vnd.businessobjects 291 | cdxml,application/vnd.chemdraw+xml 292 | mmd,application/vnd.chipnuts.karaoke-mmd 293 | cdy,application/vnd.cinderella 294 | cla,application/vnd.claymore 295 | rp9,application/vnd.cloanto.rp9 296 | c4g,application/vnd.clonk.c4group 297 | c4d,application/vnd.clonk.c4group 298 | c4f,application/vnd.clonk.c4group 299 | c4p,application/vnd.clonk.c4group 300 | c4u,application/vnd.clonk.c4group 301 | c11amc,application/vnd.cluetrust.cartomobile-config 302 | c11amz,application/vnd.cluetrust.cartomobile-config-pkg 303 | csp,application/vnd.commonspace 304 | cdbcmsg,application/vnd.contact.cmsg 305 | cmc,application/vnd.cosmocaller 306 | clkx,application/vnd.crick.clicker 307 | clkk,application/vnd.crick.clicker.keyboard 308 | clkp,application/vnd.crick.clicker.palette 309 | clkt,application/vnd.crick.clicker.template 310 | clkw,application/vnd.crick.clicker.wordbank 311 | wbs,application/vnd.criticaltools.wbs+xml 312 | pml,application/vnd.ctc-posml 313 | ppd,application/vnd.cups-ppd 314 | car,application/vnd.curl.car 315 | pcurl,application/vnd.curl.pcurl 316 | dart,application/vnd.dart 317 | rdz,application/vnd.data-vision.rdz 318 | uvf,application/vnd.dece.data 319 | uvvf,application/vnd.dece.data 320 | uvd,application/vnd.dece.data 321 | uvvd,application/vnd.dece.data 322 | uvt,application/vnd.dece.ttml+xml 323 | uvvt,application/vnd.dece.ttml+xml 324 | uvx,application/vnd.dece.unspecified 325 | uvvx,application/vnd.dece.unspecified 326 | uvz,application/vnd.dece.zip 327 | uvvz,application/vnd.dece.zip 328 | fe_launch,application/vnd.denovo.fcselayout-link 329 | dna,application/vnd.dna 330 | mlp,application/vnd.dolby.mlp 331 | dpg,application/vnd.dpgraph 332 | dfac,application/vnd.dreamfactory 333 | kpxx,application/vnd.ds-keypoint 334 | ait,application/vnd.dvb.ait 335 | svc,application/vnd.dvb.service 336 | geo,application/vnd.dynageo 337 | mag,application/vnd.ecowin.chart 338 | nml,application/vnd.enliven 339 | esf,application/vnd.epson.esf 340 | msf,application/vnd.epson.msf 341 | qam,application/vnd.epson.quickanime 342 | slt,application/vnd.epson.salt 343 | ssf,application/vnd.epson.ssf 344 | es3,application/vnd.eszigno3+xml 345 | et3,application/vnd.eszigno3+xml 346 | ez2,application/vnd.ezpix-album 347 | ez3,application/vnd.ezpix-package 348 | fdf,application/vnd.fdf 349 | mseed,application/vnd.fdsn.mseed 350 | seed,application/vnd.fdsn.seed 351 | dataless,application/vnd.fdsn.seed 352 | gph,application/vnd.flographit 353 | ftc,application/vnd.fluxtime.clip 354 | fm,application/vnd.framemaker 355 | frame,application/vnd.framemaker 356 | maker,application/vnd.framemaker 357 | book,application/vnd.framemaker 358 | fnc,application/vnd.frogans.fnc 359 | ltf,application/vnd.frogans.ltf 360 | fsc,application/vnd.fsc.weblaunch 361 | oas,application/vnd.fujitsu.oasys 362 | oa2,application/vnd.fujitsu.oasys2 363 | oa3,application/vnd.fujitsu.oasys3 364 | fg5,application/vnd.fujitsu.oasysgp 365 | bh2,application/vnd.fujitsu.oasysprs 366 | ddd,application/vnd.fujixerox.ddd 367 | xdw,application/vnd.fujixerox.docuworks 368 | xbd,application/vnd.fujixerox.docuworks.binder 369 | fzs,application/vnd.fuzzysheet 370 | txd,application/vnd.genomatix.tuxedo 371 | ggb,application/vnd.geogebra.file 372 | ggt,application/vnd.geogebra.tool 373 | gex,application/vnd.geometry-explorer 374 | gre,application/vnd.geometry-explorer 375 | gxt,application/vnd.geonext 376 | g2w,application/vnd.geoplan 377 | g3w,application/vnd.geospace 378 | gmx,application/vnd.gmx 379 | kml,application/vnd.google-earth.kml+xml 380 | kmz,application/vnd.google-earth.kmz 381 | gqf,application/vnd.grafeq 382 | gqs,application/vnd.grafeq 383 | gac,application/vnd.groove-account 384 | ghf,application/vnd.groove-help 385 | gim,application/vnd.groove-identity-message 386 | grv,application/vnd.groove-injector 387 | gtm,application/vnd.groove-tool-message 388 | tpl,application/vnd.groove-tool-template 389 | vcg,application/vnd.groove-vcard 390 | hal,application/vnd.hal+xml 391 | zmm,application/vnd.handheld-entertainment+xml 392 | hbci,application/vnd.hbci 393 | les,application/vnd.hhe.lesson-player 394 | hgl,application/vnd.hp-hpgl 395 | hpg,application/vnd.hp-hpgl 396 | hpgl,application/vnd.hp-hpgl 397 | hpid,application/vnd.hp-hpid 398 | hps,application/vnd.hp-hps 399 | jlt,application/vnd.hp-jlyt 400 | pcl,application/vnd.hp-pcl 401 | pclxl,application/vnd.hp-pclxl 402 | sfd-hdstx,application/vnd.hydrostatix.sof-data 403 | x3d,application/vnd.hzn-3d-crossword 404 | mpy,application/vnd.ibm.minipay 405 | afp,application/vnd.ibm.modcap 406 | listafp,application/vnd.ibm.modcap 407 | list3820,application/vnd.ibm.modcap 408 | irm,application/vnd.ibm.rights-management 409 | sc,application/vnd.ibm.secure-container 410 | icc,application/vnd.iccprofile 411 | icm,application/vnd.iccprofile 412 | igl,application/vnd.igloader 413 | ivp,application/vnd.immervision-ivp 414 | ivu,application/vnd.immervision-ivu 415 | igm,application/vnd.insors.igm 416 | xpw,application/vnd.intercon.formnet 417 | xpx,application/vnd.intercon.formnet 418 | i2g,application/vnd.intergeo 419 | qbo,application/vnd.intu.qbo 420 | qfx,application/vnd.intu.qfx 421 | rcprofile,application/vnd.ipunplugged.rcprofile 422 | irp,application/vnd.irepository.package+xml 423 | xpr,application/vnd.is-xpr 424 | fcs,application/vnd.isac.fcs 425 | jam,application/vnd.jam 426 | rms,application/vnd.jcp.javame.midlet-rms 427 | jisp,application/vnd.jisp 428 | joda,application/vnd.joost.joda-archive 429 | ktz,application/vnd.kahootz 430 | ktr,application/vnd.kahootz 431 | karbon,application/vnd.kde.karbon 432 | chrt,application/vnd.kde.kchart 433 | kfo,application/vnd.kde.kformula 434 | flw,application/vnd.kde.kivio 435 | kon,application/vnd.kde.kontour 436 | kpr,application/vnd.kde.kpresenter 437 | kpt,application/vnd.kde.kpresenter 438 | ksp,application/vnd.kde.kspread 439 | kwd,application/vnd.kde.kword 440 | kwt,application/vnd.kde.kword 441 | htke,application/vnd.kenameaapp 442 | kia,application/vnd.kidspiration 443 | kne,application/vnd.kinar 444 | knp,application/vnd.kinar 445 | skp,application/vnd.koan 446 | skd,application/vnd.koan 447 | skt,application/vnd.koan 448 | skm,application/vnd.koan 449 | sse,application/vnd.kodak-descriptor 450 | lasxml,application/vnd.las.las+xml 451 | lbd,application/vnd.llamagraphics.life-balance.desktop 452 | lbe,application/vnd.llamagraphics.life-balance.exchange+xml 453 | 123,application/vnd.lotus-1-2-3 454 | apr,application/vnd.lotus-approach 455 | pre,application/vnd.lotus-freelance 456 | nsf,application/vnd.lotus-notes 457 | org,application/vnd.lotus-organizer 458 | scm,application/vnd.lotus-screencam 459 | lwp,application/vnd.lotus-wordpro 460 | portpkg,application/vnd.macports.portpkg 461 | mcd,application/vnd.mcd 462 | mc1,application/vnd.medcalcdata 463 | cdkey,application/vnd.mediastation.cdkey 464 | mwf,application/vnd.mfer 465 | mfm,application/vnd.mfmp 466 | flo,application/vnd.micrografx.flo 467 | igx,application/vnd.micrografx.igx 468 | mif,application/vnd.mif 469 | daf,application/vnd.mobius.daf 470 | dis,application/vnd.mobius.dis 471 | mbk,application/vnd.mobius.mbk 472 | mqy,application/vnd.mobius.mqy 473 | msl,application/vnd.mobius.msl 474 | plc,application/vnd.mobius.plc 475 | txf,application/vnd.mobius.txf 476 | mpn,application/vnd.mophun.application 477 | mpc,application/vnd.mophun.certificate 478 | xul,application/vnd.mozilla.xul+xml 479 | cil,application/vnd.ms-artgalry 480 | cab,application/vnd.ms-cab-compressed 481 | xls,application/vnd.ms-excel 482 | xlm,application/vnd.ms-excel 483 | xla,application/vnd.ms-excel 484 | xlc,application/vnd.ms-excel 485 | xlt,application/vnd.ms-excel 486 | xlb,application/vnd.ms-excel 487 | xll,application/vnd.ms-excel 488 | xlw,application/vnd.ms-excel 489 | xlam,application/vnd.ms-excel.addin.macroEnabled.12 490 | xlam,application/vnd.ms-excel.addin.macroenabled.12 491 | xlsb,application/vnd.ms-excel.sheet.binary.macroEnabled.12 492 | xlsb,application/vnd.ms-excel.sheet.binary.macroenabled.12 493 | xlsm,application/vnd.ms-excel.sheet.macroEnabled.12 494 | xlsm,application/vnd.ms-excel.sheet.macroenabled.12 495 | xltm,application/vnd.ms-excel.template.macroEnabled.12 496 | xltm,application/vnd.ms-excel.template.macroenabled.12 497 | eot,application/vnd.ms-fontobject 498 | chm,application/vnd.ms-htmlhelp 499 | ims,application/vnd.ms-ims 500 | lrm,application/vnd.ms-lrm 501 | thmx,application/vnd.ms-officetheme 502 | msg,application/vnd.ms-outlook 503 | sst,application/vnd.ms-pki.certstore 504 | pko,application/vnd.ms-pki.pko 505 | cat,application/vnd.ms-pki.seccat 506 | stl,application/vnd.ms-pki.stl 507 | sst,application/vnd.ms-pkicertstore 508 | cat,application/vnd.ms-pkiseccat 509 | stl,application/vnd.ms-pkistl 510 | ppt,application/vnd.ms-powerpoint 511 | pps,application/vnd.ms-powerpoint 512 | pot,application/vnd.ms-powerpoint 513 | ppa,application/vnd.ms-powerpoint 514 | pwz,application/vnd.ms-powerpoint 515 | ppam,application/vnd.ms-powerpoint.addin.macroEnabled.12 516 | ppam,application/vnd.ms-powerpoint.addin.macroenabled.12 517 | pptm,application/vnd.ms-powerpoint.presentation.macroEnabled.12 518 | potm,application/vnd.ms-powerpoint.presentation.macroEnabled.12 519 | pptm,application/vnd.ms-powerpoint.presentation.macroenabled.12 520 | potm,application/vnd.ms-powerpoint.presentation.macroenabled.12 521 | sldm,application/vnd.ms-powerpoint.slide.macroEnabled.12 522 | sldm,application/vnd.ms-powerpoint.slide.macroenabled.12 523 | ppsm,application/vnd.ms-powerpoint.slideshow.macroEnabled.12 524 | ppsm,application/vnd.ms-powerpoint.slideshow.macroenabled.12 525 | potm,application/vnd.ms-powerpoint.template.macroEnabled.12 526 | potm,application/vnd.ms-powerpoint.template.macroenabled.12 527 | mpp,application/vnd.ms-project 528 | mpt,application/vnd.ms-project 529 | docm,application/vnd.ms-word.document.macroEnabled.12 530 | docm,application/vnd.ms-word.document.macroenabled.12 531 | dotm,application/vnd.ms-word.template.macroEnabled.12 532 | dotm,application/vnd.ms-word.template.macroenabled.12 533 | wps,application/vnd.ms-works 534 | wks,application/vnd.ms-works 535 | wcm,application/vnd.ms-works 536 | wdb,application/vnd.ms-works 537 | wpl,application/vnd.ms-wpl 538 | xps,application/vnd.ms-xpsdocument 539 | mseq,application/vnd.mseq 540 | mus,application/vnd.musician 541 | msty,application/vnd.muvee.style 542 | taglet,application/vnd.mynfc 543 | nlu,application/vnd.neurolanguage.nlu 544 | ntf,application/vnd.nitf 545 | nitf,application/vnd.nitf 546 | nnd,application/vnd.noblenet-directory 547 | nns,application/vnd.noblenet-sealer 548 | nnw,application/vnd.noblenet-web 549 | ncm,application/vnd.nokia.configuration-message 550 | ngdat,application/vnd.nokia.n-gage.data 551 | n-gage,application/vnd.nokia.n-gage.symbian.install 552 | rpst,application/vnd.nokia.radio-preset 553 | rpss,application/vnd.nokia.radio-presets 554 | rng,application/vnd.nokia.ringing-tone 555 | edm,application/vnd.novadigm.EDM 556 | edx,application/vnd.novadigm.EDX 557 | ext,application/vnd.novadigm.EXT 558 | edm,application/vnd.novadigm.edm 559 | edx,application/vnd.novadigm.edx 560 | ext,application/vnd.novadigm.ext 561 | odc,application/vnd.oasis.opendocument.chart 562 | otc,application/vnd.oasis.opendocument.chart-template 563 | odb,application/vnd.oasis.opendocument.database 564 | odf,application/vnd.oasis.opendocument.formula 565 | odft,application/vnd.oasis.opendocument.formula-template 566 | odg,application/vnd.oasis.opendocument.graphics 567 | otg,application/vnd.oasis.opendocument.graphics-template 568 | odi,application/vnd.oasis.opendocument.image 569 | oti,application/vnd.oasis.opendocument.image-template 570 | odp,application/vnd.oasis.opendocument.presentation 571 | otp,application/vnd.oasis.opendocument.presentation-template 572 | ods,application/vnd.oasis.opendocument.spreadsheet 573 | ots,application/vnd.oasis.opendocument.spreadsheet-template 574 | odt,application/vnd.oasis.opendocument.text 575 | odm,application/vnd.oasis.opendocument.text-master 576 | otm,application/vnd.oasis.opendocument.text-master 577 | ott,application/vnd.oasis.opendocument.text-template 578 | oth,application/vnd.oasis.opendocument.text-web 579 | xo,application/vnd.olpc-sugar 580 | dd2,application/vnd.oma.dd2+xml 581 | oxt,application/vnd.openofficeorg.extension 582 | pptx,application/vnd.openxmlformats-officedocument.presentationml.presentation 583 | sldx,application/vnd.openxmlformats-officedocument.presentationml.slide 584 | ppsx,application/vnd.openxmlformats-officedocument.presentationml.slideshow 585 | potx,application/vnd.openxmlformats-officedocument.presentationml.template 586 | xlsx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet 587 | xltx,application/vnd.openxmlformats-officedocument.spreadsheetml.template 588 | docx,application/vnd.openxmlformats-officedocument.wordprocessingml.document 589 | dotx,application/vnd.openxmlformats-officedocument.wordprocessingml.template 590 | mgp,application/vnd.osgeo.mapguide.package 591 | dp,application/vnd.osgi.dp 592 | esa,application/vnd.osgi.subsystem 593 | pdb,application/vnd.palm 594 | pqa,application/vnd.palm 595 | oprc,application/vnd.palm 596 | paw,application/vnd.pawaafile 597 | str,application/vnd.pg.format 598 | ei6,application/vnd.pg.osasli 599 | efif,application/vnd.picsel 600 | wg,application/vnd.pmi.widget 601 | plf,application/vnd.pocketlearn 602 | pbd,application/vnd.powerbuilder6 603 | box,application/vnd.previewsystems.box 604 | mgz,application/vnd.proteus.magazine 605 | qps,application/vnd.publishare-delta-tree 606 | ptid,application/vnd.pvi.ptid1 607 | qxd,application/vnd.quark.quarkxpress 608 | qxt,application/vnd.quark.quarkxpress 609 | qwd,application/vnd.quark.quarkxpress 610 | qwt,application/vnd.quark.quarkxpress 611 | qxl,application/vnd.quark.quarkxpress 612 | qxb,application/vnd.quark.quarkxpress 613 | bed,application/vnd.realvnc.bed 614 | mxl,application/vnd.recordare.musicxml 615 | musicxml,application/vnd.recordare.musicxml+xml 616 | cryptonote,application/vnd.rig.cryptonote 617 | cod,application/vnd.rim.cod 618 | rm,application/vnd.rn-realmedia 619 | rmvb,application/vnd.rn-realmedia-vbr 620 | rnx,application/vnd.rn-realplayer 621 | link66,application/vnd.route66.link66+xml 622 | st,application/vnd.sailingtracker.track 623 | see,application/vnd.seemail 624 | sema,application/vnd.sema 625 | semd,application/vnd.semd 626 | semf,application/vnd.semf 627 | ifm,application/vnd.shana.informed.formdata 628 | itp,application/vnd.shana.informed.formtemplate 629 | iif,application/vnd.shana.informed.interchange 630 | ipk,application/vnd.shana.informed.package 631 | twd,application/vnd.simtech-mindmapper 632 | twds,application/vnd.simtech-mindmapper 633 | mmf,application/vnd.smaf 634 | teacher,application/vnd.smart.teacher 635 | sdkm,application/vnd.solent.sdkm+xml 636 | sdkd,application/vnd.solent.sdkm+xml 637 | dxp,application/vnd.spotfire.dxp 638 | sfs,application/vnd.spotfire.sfs 639 | sdc,application/vnd.stardivision.calc 640 | sda,application/vnd.stardivision.draw 641 | sdd,application/vnd.stardivision.impress 642 | sdp,application/vnd.stardivision.impress 643 | smf,application/vnd.stardivision.math 644 | sdw,application/vnd.stardivision.writer 645 | vor,application/vnd.stardivision.writer 646 | sgl,application/vnd.stardivision.writer-global 647 | smzip,application/vnd.stepmania.package 648 | sm,application/vnd.stepmania.stepchart 649 | sxc,application/vnd.sun.xml.calc 650 | stc,application/vnd.sun.xml.calc.template 651 | sxd,application/vnd.sun.xml.draw 652 | std,application/vnd.sun.xml.draw.template 653 | sxi,application/vnd.sun.xml.impress 654 | sti,application/vnd.sun.xml.impress.template 655 | sxm,application/vnd.sun.xml.math 656 | sxw,application/vnd.sun.xml.writer 657 | sxg,application/vnd.sun.xml.writer.global 658 | stw,application/vnd.sun.xml.writer.template 659 | sus,application/vnd.sus-calendar 660 | susp,application/vnd.sus-calendar 661 | svd,application/vnd.svd 662 | sis,application/vnd.symbian.install 663 | sisx,application/vnd.symbian.install 664 | xsm,application/vnd.syncml+xml 665 | bdm,application/vnd.syncml.dm+wbxml 666 | xdm,application/vnd.syncml.dm+xml 667 | tao,application/vnd.tao.intent-module-archive 668 | pcap,application/vnd.tcpdump.pcap 669 | cap,application/vnd.tcpdump.pcap 670 | dmp,application/vnd.tcpdump.pcap 671 | tmo,application/vnd.tmobile-livetv 672 | tpt,application/vnd.trid.tpt 673 | mxs,application/vnd.triscape.mxs 674 | tra,application/vnd.trueapp 675 | ufd,application/vnd.ufdl 676 | ufdl,application/vnd.ufdl 677 | utz,application/vnd.uiq.theme 678 | umj,application/vnd.umajin 679 | unityweb,application/vnd.unity 680 | uoml,application/vnd.uoml+xml 681 | vcx,application/vnd.vcx 682 | vsd,application/vnd.visio 683 | vst,application/vnd.visio 684 | vss,application/vnd.visio 685 | vsw,application/vnd.visio 686 | vis,application/vnd.visionary 687 | vsf,application/vnd.vsf 688 | sic,application/vnd.wap.sic 689 | slc,application/vnd.wap.slc 690 | wbxml,application/vnd.wap.wbxml 691 | wmlc,application/vnd.wap.wmlc 692 | wmlsc,application/vnd.wap.wmlscriptc 693 | wtb,application/vnd.webturbo 694 | nbp,application/vnd.wolfram.player 695 | wpd,application/vnd.wordperfect 696 | wqd,application/vnd.wqd 697 | stf,application/vnd.wt.stf 698 | xar,application/vnd.xara 699 | web,application/vnd.xara 700 | xfdl,application/vnd.xfdl 701 | hvd,application/vnd.yamaha.hv-dic 702 | hvs,application/vnd.yamaha.hv-script 703 | hvp,application/vnd.yamaha.hv-voice 704 | osf,application/vnd.yamaha.openscoreformat 705 | osfpvg,application/vnd.yamaha.openscoreformat.osfpvg+xml 706 | saf,application/vnd.yamaha.smaf-audio 707 | spf,application/vnd.yamaha.smaf-phrase 708 | cmp,application/vnd.yellowriver-custom-menu 709 | zir,application/vnd.zul 710 | zirz,application/vnd.zul 711 | zaz,application/vnd.zzazz.deck+xml 712 | vmd,application/vocaltec-media-desc 713 | vmf,application/vocaltec-media-file 714 | vxml,application/voicexml+xml 715 | wgt,application/widget 716 | hlp,application/winhlp 717 | wp,application/wordperfect 718 | wp5,application/wordperfect 719 | wp6,application/wordperfect 720 | wpd,application/wordperfect 721 | wp5,application/wordperfect5.1 722 | w60,application/wordperfect6.0 723 | wp5,application/wordperfect6.0 724 | w61,application/wordperfect6.1 725 | wsdl,application/wsdl+xml 726 | wspolicy,application/wspolicy+xml 727 | wk1,application/x-123 728 | wk,application/x-123 729 | 7z,application/x-7z-compressed 730 | abw,application/x-abiword 731 | ace,application/x-ace-compressed 732 | aim,application/x-aim 733 | dmg,application/x-apple-diskimage 734 | aab,application/x-authorware-bin 735 | x32,application/x-authorware-bin 736 | u32,application/x-authorware-bin 737 | vox,application/x-authorware-bin 738 | aam,application/x-authorware-map 739 | aas,application/x-authorware-seg 740 | bcpio,application/x-bcpio 741 | bin,application/x-binary 742 | hqx,application/x-binhex40 743 | torrent,application/x-bittorrent 744 | blb,application/x-blorb 745 | blorb,application/x-blorb 746 | bsh,application/x-bsh 747 | sh,application/x-bsh 748 | shar,application/x-bsh 749 | elc,application/x-bytecode.elisp 750 | elc,application/x-bytecode.elisp(compiledelisp) 751 | bz,application/x-bzip 752 | bz2,application/x-bzip2 753 | boz,application/x-bzip2 754 | cbr,application/x-cbr 755 | cba,application/x-cbr 756 | cbt,application/x-cbr 757 | cbz,application/x-cbr 758 | cb7,application/x-cbr 759 | cdf,application/x-cdf 760 | vcd,application/x-cdlink 761 | cfs,application/x-cfs-compressed 762 | chat,application/x-chat 763 | cha,application/x-chat 764 | pgn,application/x-chess-pgn 765 | chm,application/x-chm 766 | crx,application/x-chrome-extension 767 | ras,application/x-cmu-raster 768 | cco,application/x-cocoa 769 | cpt,application/x-compactpro 770 | z,application/x-compress 771 | gz,application/x-compressed 772 | tgz,application/x-compressed 773 | z,application/x-compressed 774 | zip,application/x-compressed 775 | nsc,application/x-conference 776 | cpio,application/x-cpio 777 | cpt,application/x-cpt 778 | csh,application/x-csh 779 | deb,application/x-debian-package 780 | udeb,application/x-debian-package 781 | deepv,application/x-deepv 782 | dgc,application/x-dgc-compressed 783 | dir,application/x-director 784 | dcr,application/x-director 785 | dxr,application/x-director 786 | cst,application/x-director 787 | cct,application/x-director 788 | cxt,application/x-director 789 | w3d,application/x-director 790 | fgd,application/x-director 791 | swa,application/x-director 792 | dms,application/x-dms 793 | wad,application/x-doom 794 | ncx,application/x-dtbncx+xml 795 | dtb,application/x-dtbook+xml 796 | res,application/x-dtbresource+xml 797 | dvi,application/x-dvi 798 | elc,application/x-elc 799 | env,application/x-envoy 800 | evy,application/x-envoy 801 | es,application/x-esrehber 802 | eva,application/x-eva 803 | xla,application/x-excel 804 | xlb,application/x-excel 805 | xlc,application/x-excel 806 | xld,application/x-excel 807 | xlk,application/x-excel 808 | xll,application/x-excel 809 | xlm,application/x-excel 810 | xls,application/x-excel 811 | xlt,application/x-excel 812 | xlv,application/x-excel 813 | xlw,application/x-excel 814 | flac,application/x-flac 815 | pfa,application/x-font 816 | pfb,application/x-font 817 | gsf,application/x-font 818 | pcf,application/x-font 819 | pcf.Z,application/x-font 820 | bdf,application/x-font-bdf 821 | gsf,application/x-font-ghostscript 822 | psf,application/x-font-linux-psf 823 | otf,application/x-font-otf 824 | pcf,application/x-font-pcf 825 | snf,application/x-font-snf 826 | ttf,application/x-font-ttf 827 | ttc,application/x-font-ttf 828 | pfa,application/x-font-type1 829 | pfb,application/x-font-type1 830 | pfm,application/x-font-type1 831 | afm,application/x-font-type1 832 | woff,application/x-font-woff 833 | mif,application/x-frame 834 | arc,application/x-freearc 835 | pre,application/x-freelance 836 | spl,application/x-futuresplash 837 | gca,application/x-gca-compressed 838 | ulx,application/x-glulx 839 | gnumeric,application/x-gnumeric 840 | sgf,application/x-go-sgf 841 | gramps,application/x-gramps-xml 842 | gcf,application/x-graphing-calculator 843 | gsp,application/x-gsp 844 | gss,application/x-gss 845 | gtar,application/x-gtar 846 | tgz,application/x-gtar 847 | taz,application/x-gtar 848 | gz,application/x-gzip 849 | gzip,application/x-gzip 850 | tgz,application/x-gzip 851 | hdf,application/x-hdf 852 | help,application/x-helpfile 853 | hlp,application/x-helpfile 854 | imap,application/x-httpd-imap 855 | phtml,application/x-httpd-php 856 | pht,application/x-httpd-php 857 | php,application/x-httpd-php 858 | phps,application/x-httpd-php-source 859 | php3,application/x-httpd-php3 860 | php3p,application/x-httpd-php3-preprocessed 861 | php4,application/x-httpd-php4 862 | ica,application/x-ica 863 | ima,application/x-ima 864 | install,application/x-install-instructions 865 | ins,application/x-internet-signup 866 | isp,application/x-internet-signup 867 | ins,application/x-internett-signup 868 | iv,application/x-inventor 869 | ip,application/x-ip2 870 | iii,application/x-iphone 871 | iso,application/x-iso9660-image 872 | jar,application/x-java-archive 873 | class,application/x-java-class 874 | jcm,application/x-java-commerce 875 | jnlp,application/x-java-jnlp-file 876 | ser,application/x-java-serialized-object 877 | class,application/x-java-vm 878 | js,application/x-javascript 879 | chrt,application/x-kchart 880 | kil,application/x-killustrator 881 | skd,application/x-koan 882 | skm,application/x-koan 883 | skp,application/x-koan 884 | skt,application/x-koan 885 | kpr,application/x-kpresenter 886 | kpt,application/x-kpresenter 887 | ksh,application/x-ksh 888 | ksp,application/x-kspread 889 | kwd,application/x-kword 890 | kwt,application/x-kword 891 | latex,application/x-latex 892 | ltx,application/x-latex 893 | lha,application/x-lha 894 | lsp,application/x-lisp 895 | ivy,application/x-livescreen 896 | wq1,application/x-lotus 897 | scm,application/x-lotusscreencam 898 | luac,application/x-lua-bytecode 899 | lzh,application/x-lzh 900 | lzh,application/x-lzh-compressed 901 | lha,application/x-lzh-compressed 902 | lzx,application/x-lzx 903 | hqx,application/x-mac-binhex40 904 | bin,application/x-macbinary 905 | mc$,application/x-magic-cap-package-1.0 906 | frm,application/x-maker 907 | maker,application/x-maker 908 | frame,application/x-maker 909 | fm,application/x-maker 910 | fb,application/x-maker 911 | book,application/x-maker 912 | fbdoc,application/x-maker 913 | mcd,application/x-mathcad 914 | mm,application/x-meme 915 | mid,application/x-midi 916 | midi,application/x-midi 917 | mie,application/x-mie 918 | mif,application/x-mif 919 | nix,application/x-mix-transfer 920 | prc,application/x-mobipocket-ebook 921 | mobi,application/x-mobipocket-ebook 922 | m3u8,application/x-mpegURL 923 | asx,application/x-mplayer2 924 | application,application/x-ms-application 925 | lnk,application/x-ms-shortcut 926 | wmd,application/x-ms-wmd 927 | wmz,application/x-ms-wmz 928 | xbap,application/x-ms-xbap 929 | mdb,application/x-msaccess 930 | obd,application/x-msbinder 931 | crd,application/x-mscardfile 932 | clp,application/x-msclip 933 | com,application/x-msdos-program 934 | exe,application/x-msdos-program 935 | bat,application/x-msdos-program 936 | dll,application/x-msdos-program 937 | exe,application/x-msdownload 938 | dll,application/x-msdownload 939 | com,application/x-msdownload 940 | bat,application/x-msdownload 941 | msi,application/x-msdownload 942 | xla,application/x-msexcel 943 | xls,application/x-msexcel 944 | xlw,application/x-msexcel 945 | msi,application/x-msi 946 | mvb,application/x-msmediaview 947 | m13,application/x-msmediaview 948 | m14,application/x-msmediaview 949 | wmf,application/x-msmetafile 950 | wmz,application/x-msmetafile 951 | emf,application/x-msmetafile 952 | emz,application/x-msmetafile 953 | mny,application/x-msmoney 954 | ppt,application/x-mspowerpoint 955 | pub,application/x-mspublisher 956 | scd,application/x-msschedule 957 | trm,application/x-msterminal 958 | wri,application/x-mswrite 959 | ani,application/x-navi-animation 960 | nvd,application/x-navidoc 961 | map,application/x-navimap 962 | stl,application/x-navistyle 963 | nc,application/x-netcdf 964 | cdf,application/x-netcdf 965 | pkg,application/x-newton-compatible-pkg 966 | aos,application/x-nokia-9000-communicator-add-on-software 967 | pac,application/x-ns-proxy-autoconfig 968 | nwc,application/x-nwc 969 | nzb,application/x-nzb 970 | o,application/x-object 971 | omc,application/x-omc 972 | omcd,application/x-omcdatamaker 973 | omcr,application/x-omcregerator 974 | oza,application/x-oz-application 975 | pm4,application/x-pagemaker 976 | pm5,application/x-pagemaker 977 | pcl,application/x-pcl 978 | pma,application/x-perfmon 979 | pmc,application/x-perfmon 980 | pml,application/x-perfmon 981 | pmr,application/x-perfmon 982 | pmw,application/x-perfmon 983 | plx,application/x-pixclscript 984 | p10,application/x-pkcs10 985 | p12,application/x-pkcs12 986 | pfx,application/x-pkcs12 987 | p7b,application/x-pkcs7-certificates 988 | spc,application/x-pkcs7-certificates 989 | p7r,application/x-pkcs7-certreqresp 990 | crl,application/x-pkcs7-crl 991 | p7c,application/x-pkcs7-mime 992 | p7m,application/x-pkcs7-mime 993 | p7a,application/x-pkcs7-signature 994 | p7s,application/x-pkcs7-signature 995 | css,application/x-pointplus 996 | pnm,application/x-portable-anymap 997 | mpc,application/x-project 998 | mpt,application/x-project 999 | mpv,application/x-project 1000 | mpx,application/x-project 1001 | pyc,application/x-python-code 1002 | pyo,application/x-python-code 1003 | wb1,application/x-qpro 1004 | qtl,application/x-quicktimeplayer 1005 | rar,application/x-rar-compressed 1006 | rpm,application/x-redhat-package-manager 1007 | ris,application/x-research-info-systems 1008 | rpm,application/x-rpm 1009 | rtf,application/x-rtf 1010 | sdp,application/x-sdp 1011 | sea,application/x-sea 1012 | sl,application/x-seelogo 1013 | sh,application/x-sh 1014 | shar,application/x-shar 1015 | sh,application/x-shar 1016 | swf,application/x-shockwave-flash 1017 | swfl,application/x-shockwave-flash 1018 | xap,application/x-silverlight-app 1019 | sit,application/x-sit 1020 | spr,application/x-sprite 1021 | sprite,application/x-sprite 1022 | sql,application/x-sql 1023 | sit,application/x-stuffit 1024 | sitx,application/x-stuffitx 1025 | srt,application/x-subrip 1026 | sv4cpio,application/x-sv4cpio 1027 | sv4crc,application/x-sv4crc 1028 | t3,application/x-t3vm-image 1029 | gam,application/x-tads 1030 | tar,application/x-tar 1031 | sbk,application/x-tbook 1032 | tbk,application/x-tbook 1033 | tcl,application/x-tcl 1034 | tex,application/x-tex 1035 | gf,application/x-tex-gf 1036 | pk,application/x-tex-pk 1037 | tfm,application/x-tex-tfm 1038 | texinfo,application/x-texinfo 1039 | texi,application/x-texinfo 1040 | obj,application/x-tgif 1041 | ~,application/x-trash 1042 | %,application/x-trash 1043 | bak,application/x-trash 1044 | old,application/x-trash 1045 | sik,application/x-trash 1046 | roff,application/x-troff 1047 | t,application/x-troff 1048 | tr,application/x-troff 1049 | man,application/x-troff-man 1050 | me,application/x-troff-me 1051 | ms,application/x-troff-ms 1052 | avi,application/x-troff-msvideo 1053 | ustar,application/x-ustar 1054 | vsd,application/x-visio 1055 | vst,application/x-visio 1056 | vsw,application/x-visio 1057 | mzz,application/x-vnd.audioexplosion.mzz 1058 | xpix,application/x-vnd.ls-xpix 1059 | vrml,application/x-vrml 1060 | src,application/x-wais-source 1061 | wsrc,application/x-wais-source 1062 | webapp,application/x-web-app-manifest+json 1063 | wz,application/x-wingz 1064 | hlp,application/x-winhelp 1065 | wtk,application/x-wintalk 1066 | svr,application/x-world 1067 | wrl,application/x-world 1068 | wpd,application/x-wpwin 1069 | wri,application/x-wri 1070 | der,application/x-x509-ca-cert 1071 | cer,application/x-x509-ca-cert 1072 | crt,application/x-x509-ca-cert 1073 | crt,application/x-x509-user-cert 1074 | xcf,application/x-xcf 1075 | fig,application/x-xfig 1076 | xlf,application/x-xliff+xml 1077 | xpi,application/x-xpinstall 1078 | xz,application/x-xz 1079 | zip,application/x-zip-compressed 1080 | z1,application/x-zmachine 1081 | z2,application/x-zmachine 1082 | z3,application/x-zmachine 1083 | z4,application/x-zmachine 1084 | z5,application/x-zmachine 1085 | z6,application/x-zmachine 1086 | z7,application/x-zmachine 1087 | z8,application/x-zmachine 1088 | xaml,application/xaml+xml 1089 | xdf,application/xcap-diff+xml 1090 | xenc,application/xenc+xml 1091 | xhtml,application/xhtml+xml 1092 | xht,application/xhtml+xml 1093 | xml,application/xml 1094 | xsl,application/xml 1095 | xpdl,application/xml 1096 | dtd,application/xml-dtd 1097 | xop,application/xop+xml 1098 | xpl,application/xproc+xml 1099 | xslt,application/xslt+xml 1100 | xspf,application/xspf+xml 1101 | mxml,application/xv+xml 1102 | xhvml,application/xv+xml 1103 | xvml,application/xv+xml 1104 | xvm,application/xv+xml 1105 | yang,application/yang 1106 | yin,application/yin+xml 1107 | pko,application/ynd.ms-pkipko 1108 | zip,application/zip 1109 | adp,audio/adpcm 1110 | aif,audio/aiff 1111 | aifc,audio/aiff 1112 | aiff,audio/aiff 1113 | au,audio/basic 1114 | snd,audio/basic 1115 | flac,audio/flac 1116 | it,audio/it 1117 | funk,audio/make 1118 | my,audio/make 1119 | pfunk,audio/make 1120 | pfunk,audio/make.my.funk 1121 | rmi,audio/mid 1122 | mid,audio/mid 1123 | mid,audio/midi 1124 | midi,audio/midi 1125 | kar,audio/midi 1126 | rmi,audio/midi 1127 | mod,audio/mod 1128 | mp4a,audio/mp4 1129 | m4a,audio/mp4 1130 | mpga,audio/mpeg 1131 | mp2,audio/mpeg 1132 | mp2a,audio/mpeg 1133 | mp3,audio/mpeg 1134 | m2a,audio/mpeg 1135 | mpa,audio/mpeg 1136 | mpg,audio/mpeg 1137 | m3a,audio/mpeg 1138 | mpega,audio/mpeg 1139 | m4a,audio/mpeg 1140 | mp3,audio/mpeg3 1141 | m3u,audio/mpegurl 1142 | la,audio/nspaudio 1143 | lma,audio/nspaudio 1144 | oga,audio/ogg 1145 | ogg,audio/ogg 1146 | spx,audio/ogg 1147 | sid,audio/prs.sid 1148 | s3m,audio/s3m 1149 | sil,audio/silk 1150 | tsi,audio/tsp-audio 1151 | tsp,audio/tsplayer 1152 | uva,audio/vnd.dece.audio 1153 | uvva,audio/vnd.dece.audio 1154 | eol,audio/vnd.digital-winds 1155 | dra,audio/vnd.dra 1156 | dts,audio/vnd.dts 1157 | dtshd,audio/vnd.dts.hd 1158 | lvp,audio/vnd.lucent.voice 1159 | pya,audio/vnd.ms-playready.media.pya 1160 | ecelp4800,audio/vnd.nuera.ecelp4800 1161 | ecelp7470,audio/vnd.nuera.ecelp7470 1162 | ecelp9600,audio/vnd.nuera.ecelp9600 1163 | qcp,audio/vnd.qcelp 1164 | rip,audio/vnd.rip 1165 | voc,audio/voc 1166 | vox,audio/voxware 1167 | wav,audio/wav 1168 | weba,audio/webm 1169 | aac,audio/x-aac 1170 | snd,audio/x-adpcm 1171 | aif,audio/x-aiff 1172 | aiff,audio/x-aiff 1173 | aifc,audio/x-aiff 1174 | au,audio/x-au 1175 | caf,audio/x-caf 1176 | flac,audio/x-flac 1177 | gsd,audio/x-gsm 1178 | gsm,audio/x-gsm 1179 | jam,audio/x-jam 1180 | lam,audio/x-liveaudio 1181 | mka,audio/x-matroska 1182 | mid,audio/x-mid 1183 | midi,audio/x-mid 1184 | mid,audio/x-midi 1185 | midi,audio/x-midi 1186 | mod,audio/x-mod 1187 | mp2,audio/x-mpeg 1188 | mp3,audio/x-mpeg-3 1189 | m3u,audio/x-mpegurl 1190 | m3u,audio/x-mpequrl 1191 | wax,audio/x-ms-wax 1192 | wma,audio/x-ms-wma 1193 | la,audio/x-nspaudio 1194 | lma,audio/x-nspaudio 1195 | ram,audio/x-pn-realaudio 1196 | ra,audio/x-pn-realaudio 1197 | rm,audio/x-pn-realaudio 1198 | rmm,audio/x-pn-realaudio 1199 | rmp,audio/x-pn-realaudio 1200 | rmp,audio/x-pn-realaudio-plugin 1201 | ra,audio/x-pn-realaudio-plugin 1202 | rpm,audio/x-pn-realaudio-plugin 1203 | sid,audio/x-psid 1204 | ra,audio/x-realaudio 1205 | pls,audio/x-scpls 1206 | sd2,audio/x-sd2 1207 | vqf,audio/x-twinvq 1208 | vqe,audio/x-twinvq-plugin 1209 | vql,audio/x-twinvq-plugin 1210 | mjf,audio/x-vnd.audioexplosion.mjuicemediafile 1211 | voc,audio/x-voc 1212 | wav,audio/x-wav 1213 | xm,audio/xm 1214 | cdx,chemical/x-cdx 1215 | cif,chemical/x-cif 1216 | cmdf,chemical/x-cmdf 1217 | cml,chemical/x-cml 1218 | csml,chemical/x-csml 1219 | pdb,chemical/x-pdb 1220 | xyz,chemical/x-pdb 1221 | xyz,chemical/x-xyz 1222 | dwf,drawing/x-dwf 1223 | dwf,drawing/x-dwf(old) 1224 | otf,font/opentype 1225 | ivr,i-world/i-vrml 1226 | bmp,image/bmp 1227 | bm,image/bmp 1228 | cgm,image/cgm 1229 | cod,image/cis-cod 1230 | ras,image/cmu-raster 1231 | rast,image/cmu-raster 1232 | fif,image/fif 1233 | flo,image/florian 1234 | turbot,image/florian 1235 | g3,image/g3fax 1236 | gif,image/gif 1237 | ief,image/ief 1238 | iefs,image/ief 1239 | jpeg,image/jpeg 1240 | jpg,image/jpeg 1241 | jfif,image/jpeg 1242 | jfif-tbnl,image/jpeg 1243 | jpe,image/jpeg 1244 | jut,image/jutvision 1245 | ktx,image/ktx 1246 | nap,image/naplps 1247 | naplps,image/naplps 1248 | pcx,image/pcx 1249 | pic,image/pict 1250 | pict,image/pict 1251 | jfif,image/pipeg 1252 | jfif,image/pjpeg 1253 | jpe,image/pjpeg 1254 | jpeg,image/pjpeg 1255 | jpg,image/pjpeg 1256 | png,image/png 1257 | x-png,image/png 1258 | btif,image/prs.btif 1259 | sgi,image/sgi 1260 | svg,image/svg+xml 1261 | svgz,image/svg+xml 1262 | tiff,image/tiff 1263 | tif,image/tiff 1264 | mcf,image/vasa 1265 | psd,image/vnd.adobe.photoshop 1266 | uvi,image/vnd.dece.graphic 1267 | uvvi,image/vnd.dece.graphic 1268 | uvg,image/vnd.dece.graphic 1269 | uvvg,image/vnd.dece.graphic 1270 | djvu,image/vnd.djvu 1271 | djv,image/vnd.djvu 1272 | sub,image/vnd.dvb.subtitle 1273 | dwg,image/vnd.dwg 1274 | dxf,image/vnd.dwg 1275 | svf,image/vnd.dwg 1276 | dxf,image/vnd.dxf 1277 | fbs,image/vnd.fastbidsheet 1278 | fpx,image/vnd.fpx 1279 | fpix,image/vnd.fpx 1280 | fst,image/vnd.fst 1281 | mmr,image/vnd.fujixerox.edmics-mmr 1282 | rlc,image/vnd.fujixerox.edmics-rlc 1283 | mdi,image/vnd.ms-modi 1284 | wdp,image/vnd.ms-photo 1285 | npx,image/vnd.net-fpx 1286 | fpx,image/vnd.net-fpx 1287 | rf,image/vnd.rn-realflash 1288 | rp,image/vnd.rn-realpix 1289 | wbmp,image/vnd.wap.wbmp 1290 | xif,image/vnd.xiff 1291 | webp,image/webp 1292 | 3ds,image/x-3ds 1293 | ras,image/x-cmu-rast 1294 | ras,image/x-cmu-raster 1295 | cmx,image/x-cmx 1296 | cdr,image/x-coreldraw 1297 | pat,image/x-coreldrawpattern 1298 | cdt,image/x-coreldrawtemplate 1299 | cpt,image/x-corelphotopaint 1300 | dwg,image/x-dwg 1301 | dxf,image/x-dwg 1302 | svf,image/x-dwg 1303 | fh,image/x-freehand 1304 | fhc,image/x-freehand 1305 | fh4,image/x-freehand 1306 | fh5,image/x-freehand 1307 | fh7,image/x-freehand 1308 | ico,image/x-icon 1309 | art,image/x-jg 1310 | jng,image/x-jng 1311 | jps,image/x-jps 1312 | sid,image/x-mrsid-image 1313 | bmp,image/x-ms-bmp 1314 | nif,image/x-niff 1315 | niff,image/x-niff 1316 | pcx,image/x-pcx 1317 | psd,image/x-photoshop 1318 | pic,image/x-pict 1319 | pct,image/x-pict 1320 | pnm,image/x-portable-anymap 1321 | pbm,image/x-portable-bitmap 1322 | pgm,image/x-portable-graymap 1323 | pgm,image/x-portable-greymap 1324 | ppm,image/x-portable-pixmap 1325 | qif,image/x-quicktime 1326 | qti,image/x-quicktime 1327 | qtif,image/x-quicktime 1328 | rgb,image/x-rgb 1329 | tga,image/x-tga 1330 | tif,image/x-tiff 1331 | tiff,image/x-tiff 1332 | bmp,image/x-windows-bmp 1333 | xbm,image/x-xbitmap 1334 | xpm,image/x-xbitmap 1335 | xbm,image/x-xbm 1336 | xpm,image/x-xpixmap 1337 | pm,image/x-xpixmap 1338 | xwd,image/x-xwd 1339 | xwd,image/x-xwindowdump 1340 | xbm,image/xbm 1341 | xpm,image/xpm 1342 | eml,message/rfc822 1343 | mht,message/rfc822 1344 | mhtml,message/rfc822 1345 | mime,message/rfc822 1346 | nws,message/rfc822 1347 | igs,model/iges 1348 | iges,model/iges 1349 | msh,model/mesh 1350 | mesh,model/mesh 1351 | silo,model/mesh 1352 | dae,model/vnd.collada+xml 1353 | dwf,model/vnd.dwf 1354 | gdl,model/vnd.gdl 1355 | gtw,model/vnd.gtw 1356 | mts,model/vnd.mts 1357 | vtu,model/vnd.vtu 1358 | wrl,model/vrml 1359 | vrml,model/vrml 1360 | wrz,model/vrml 1361 | pov,model/x-pov 1362 | x3db,model/x3d+binary 1363 | x3dbz,model/x3d+binary 1364 | x3dv,model/x3d+vrml 1365 | x3dvz,model/x3d+vrml 1366 | x3d,model/x3d+xml 1367 | x3dz,model/x3d+xml 1368 | gzip,multipart/x-gzip 1369 | ustar,multipart/x-ustar 1370 | zip,multipart/x-zip 1371 | mid,music/crescendo 1372 | midi,music/crescendo 1373 | kar,music/x-karaoke 1374 | pvu,paleovu/x-pv 1375 | asp,text/asp 1376 | appcache,text/cache-manifest 1377 | manifest,text/cache-manifest 1378 | ics,text/calendar 1379 | ifb,text/calendar 1380 | icz,text/calendar 1381 | csv,text/comma-separated-values 1382 | css,text/css 1383 | csv,text/csv 1384 | js,text/ecmascript 1385 | event-stream,text/event-stream 1386 | 323,text/h323 1387 | html,text/html 1388 | acgi,text/html 1389 | htm,text/html 1390 | htmls,text/html 1391 | htx,text/html 1392 | shtml,text/html 1393 | stm,text/html 1394 | uls,text/iuls 1395 | js,text/javascript 1396 | mml,text/mathml 1397 | mcf,text/mcf 1398 | n3,text/n3 1399 | pas,text/pascal 1400 | txt,text/plain 1401 | text,text/plain 1402 | conf,text/plain 1403 | def,text/plain 1404 | list,text/plain 1405 | log,text/plain 1406 | c,text/plain 1407 | c++,text/plain 1408 | cc,text/plain 1409 | com,text/plain 1410 | cxx,text/plain 1411 | f,text/plain 1412 | f90,text/plain 1413 | for,text/plain 1414 | g,text/plain 1415 | h,text/plain 1416 | hh,text/plain 1417 | idc,text/plain 1418 | jav,text/plain 1419 | java,text/plain 1420 | lst,text/plain 1421 | m,text/plain 1422 | mar,text/plain 1423 | pl,text/plain 1424 | sdml,text/plain 1425 | bas,text/plain 1426 | in,text/plain 1427 | asc,text/plain 1428 | diff,text/plain 1429 | pot,text/plain 1430 | el,text/plain 1431 | ksh,text/plain 1432 | par,text/plain-bas 1433 | dsc,text/prs.lines.tag 1434 | rtx,text/richtext 1435 | rt,text/richtext 1436 | rtf,text/richtext 1437 | rtf,text/rtf 1438 | wsc,text/scriplet 1439 | sct,text/scriptlet 1440 | wsc,text/scriptlet 1441 | sgml,text/sgml 1442 | sgm,text/sgml 1443 | tsv,text/tab-separated-values 1444 | tm,text/texmacs 1445 | ts,text/texmacs 1446 | t,text/troff 1447 | tr,text/troff 1448 | roff,text/troff 1449 | man,text/troff 1450 | me,text/troff 1451 | ms,text/troff 1452 | ttl,text/turtle 1453 | uri,text/uri-list 1454 | uris,text/uri-list 1455 | uni,text/uri-list 1456 | unis,text/uri-list 1457 | urls,text/uri-list 1458 | vcard,text/vcard 1459 | abc,text/vnd.abc 1460 | curl,text/vnd.curl 1461 | dcurl,text/vnd.curl.dcurl 1462 | mcurl,text/vnd.curl.mcurl 1463 | scurl,text/vnd.curl.scurl 1464 | sub,text/vnd.dvb.subtitle 1465 | fly,text/vnd.fly 1466 | flx,text/vnd.fmi.flexstor 1467 | gv,text/vnd.graphviz 1468 | 3dml,text/vnd.in3d.3dml 1469 | spot,text/vnd.in3d.spot 1470 | rt,text/vnd.rn-realtext 1471 | jad,text/vnd.sun.j2me.app-descriptor 1472 | si,text/vnd.wap.si 1473 | sl,text/vnd.wap.sl 1474 | wml,text/vnd.wap.wml 1475 | wmls,text/vnd.wap.wmlscript 1476 | vtt,text/vtt 1477 | htt,text/webviewhtml 1478 | s,text/x-asm 1479 | asm,text/x-asm 1480 | aip,text/x-audiosoft-intra 1481 | c,text/x-c 1482 | cc,text/x-c 1483 | cxx,text/x-c 1484 | cpp,text/x-c 1485 | h,text/x-c 1486 | hh,text/x-c 1487 | dic,text/x-c 1488 | h++,text/x-c++hdr 1489 | hpp,text/x-c++hdr 1490 | hxx,text/x-c++hdr 1491 | hh,text/x-c++hdr 1492 | c++,text/x-c++src 1493 | cpp,text/x-c++src 1494 | cxx,text/x-c++src 1495 | cc,text/x-c++src 1496 | h,text/x-chdr 1497 | htc,text/x-component 1498 | csh,text/x-csh 1499 | c,text/x-csrc 1500 | f,text/x-fortran 1501 | for,text/x-fortran 1502 | f77,text/x-fortran 1503 | f90,text/x-fortran 1504 | h,text/x-h 1505 | hh,text/x-h 1506 | java,text/x-java 1507 | java,text/x-java-source 1508 | jav,text/x-java-source 1509 | lsx,text/x-la-asf 1510 | lua,text/x-lua 1511 | m,text/x-m 1512 | markdown,text/x-markdown 1513 | md,text/x-markdown 1514 | mkd,text/x-markdown 1515 | moc,text/x-moc 1516 | nfo,text/x-nfo 1517 | opml,text/x-opml 1518 | p,text/x-pascal 1519 | pas,text/x-pascal 1520 | gcd,text/x-pcs-gcd 1521 | pl,text/x-perl 1522 | pm,text/x-perl 1523 | py,text/x-python 1524 | hlb,text/x-script 1525 | csh,text/x-script.csh 1526 | el,text/x-script.elisp 1527 | scm,text/x-script.guile 1528 | ksh,text/x-script.ksh 1529 | lsp,text/x-script.lisp 1530 | pl,text/x-script.perl 1531 | pm,text/x-script.perl-module 1532 | py,text/x-script.phyton 1533 | rexx,text/x-script.rexx 1534 | scm,text/x-script.scheme 1535 | sh,text/x-script.sh 1536 | tcl,text/x-script.tcl 1537 | tcsh,text/x-script.tcsh 1538 | zsh,text/x-script.zsh 1539 | shtml,text/x-server-parsed-html 1540 | ssi,text/x-server-parsed-html 1541 | etx,text/x-setext 1542 | sfv,text/x-sfv 1543 | sgm,text/x-sgml 1544 | sgml,text/x-sgml 1545 | sh,text/x-sh 1546 | spc,text/x-speech 1547 | talk,text/x-speech 1548 | tcl,text/x-tcl 1549 | tk,text/x-tcl 1550 | tex,text/x-tex 1551 | ltx,text/x-tex 1552 | sty,text/x-tex 1553 | cls,text/x-tex 1554 | uil,text/x-uil 1555 | uu,text/x-uuencode 1556 | uue,text/x-uuencode 1557 | vcs,text/x-vcalendar 1558 | vcf,text/x-vcard 1559 | xml,text/xml 1560 | 3gp,video/3gpp 1561 | 3g2,video/3gpp2 1562 | ts,video/MP2T 1563 | afl,video/animaflex 1564 | avi,video/avi 1565 | avs,video/avs-video 1566 | dl,video/dl 1567 | flc,video/flc 1568 | fli,video/flc 1569 | flc,video/fli 1570 | fli,video/fli 1571 | gl,video/gl 1572 | h261,video/h261 1573 | h263,video/h263 1574 | h264,video/h264 1575 | jpgv,video/jpeg 1576 | jpm,video/jpm 1577 | jpgm,video/jpm 1578 | mj2,video/mj2 1579 | mjp2,video/mj2 1580 | mp4,video/mp4 1581 | mp4v,video/mp4 1582 | mpg4,video/mp4 1583 | mpeg,video/mpeg 1584 | mpg,video/mpeg 1585 | mpe,video/mpeg 1586 | m1v,video/mpeg 1587 | m2v,video/mpeg 1588 | mp2,video/mpeg 1589 | mp3,video/mpeg 1590 | mpa,video/mpeg 1591 | mpv2,video/mpeg 1592 | avi,video/msvideo 1593 | ogv,video/ogg 1594 | qt,video/quicktime 1595 | moov,video/quicktime 1596 | mov,video/quicktime 1597 | vdo,video/vdo 1598 | viv,video/vivo 1599 | vivo,video/vivo 1600 | uvh,video/vnd.dece.hd 1601 | uvvh,video/vnd.dece.hd 1602 | uvm,video/vnd.dece.mobile 1603 | uvvm,video/vnd.dece.mobile 1604 | uvp,video/vnd.dece.pd 1605 | uvvp,video/vnd.dece.pd 1606 | uvs,video/vnd.dece.sd 1607 | uvvs,video/vnd.dece.sd 1608 | uvv,video/vnd.dece.video 1609 | uvvv,video/vnd.dece.video 1610 | dvb,video/vnd.dvb.file 1611 | fvt,video/vnd.fvt 1612 | mxu,video/vnd.mpegurl 1613 | m4u,video/vnd.mpegurl 1614 | pyv,video/vnd.ms-playready.media.pyv 1615 | rv,video/vnd.rn-realvideo 1616 | uvu,video/vnd.uvvu.mp4 1617 | uvvu,video/vnd.uvvu.mp4 1618 | viv,video/vnd.vivo 1619 | vivo,video/vnd.vivo 1620 | vos,video/vosaic 1621 | webm,video/webm 1622 | xdr,video/x-amt-demorun 1623 | xsr,video/x-amt-showrun 1624 | fmf,video/x-atomic3d-feature 1625 | dl,video/x-dl 1626 | dif,video/x-dv 1627 | dv,video/x-dv 1628 | f4v,video/x-f4v 1629 | fli,video/x-fli 1630 | flv,video/x-flv 1631 | gl,video/x-gl 1632 | isu,video/x-isvideo 1633 | lsf,video/x-la-asf 1634 | lsx,video/x-la-asf 1635 | m4v,video/x-m4v 1636 | mkv,video/x-matroska 1637 | mk3d,video/x-matroska 1638 | mks,video/x-matroska 1639 | mng,video/x-mng 1640 | mjpg,video/x-motion-jpeg 1641 | mp2,video/x-mpeg 1642 | mp3,video/x-mpeg 1643 | mp2,video/x-mpeq2a 1644 | asf,video/x-ms-asf 1645 | asx,video/x-ms-asf 1646 | asr,video/x-ms-asf 1647 | asx,video/x-ms-asf-plugin 1648 | vob,video/x-ms-vob 1649 | wm,video/x-ms-wm 1650 | wmv,video/x-ms-wmv 1651 | wmx,video/x-ms-wmx 1652 | wvx,video/x-ms-wvx 1653 | avi,video/x-msvideo 1654 | qtc,video/x-qtc 1655 | scm,video/x-scm 1656 | movie,video/x-sgi-movie 1657 | mv,video/x-sgi-movie 1658 | smv,video/x-smv 1659 | wmf,windows/metafile 1660 | mime,www/mime 1661 | ice,x-conference/x-cooltalk 1662 | mid,x-music/x-midi 1663 | midi,x-music/x-midi 1664 | 3dm,x-world/x-3dmf 1665 | 3dmf,x-world/x-3dmf 1666 | qd3,x-world/x-3dmf 1667 | qd3d,x-world/x-3dmf 1668 | svr,x-world/x-svr 1669 | vrml,x-world/x-vrml 1670 | wrl,x-world/x-vrml 1671 | wrz,x-world/x-vrml 1672 | flr,x-world/x-vrml 1673 | xaf,x-world/x-vrml 1674 | xof,x-world/x-vrml 1675 | vrm,x-world/x-vrml 1676 | vrt,x-world/x-vrt 1677 | xgz,xgl/drawing 1678 | xmz,xgl/movie 1679 | ma nb mb,application/mathematica 1680 | doc dot,application/msword 1681 | bin dms lha lrf lzh so iso dmg dist distz pkg bpk dump elc deploy,application/octet-stream 1682 | onetoc onetoc2 onetmp onepkg,application/onenote 1683 | asc sig,application/pgp-signature 1684 | p7m p7c,application/pkcs7-mime 1685 | ai eps ps,application/postscript 1686 | smi smil,application/smil+xml 1687 | atc acutc,application/vnd.acucorp 1688 | c4g c4d c4f c4p c4u,application/vnd.clonk.c4group 1689 | es3 et3,application/vnd.eszigno3+xml 1690 | seed dataless,application/vnd.fdsn.seed 1691 | fm frame maker book,application/vnd.framemaker 1692 | gex gre,application/vnd.geometry-explorer 1693 | gqf gqs,application/vnd.grafeq 1694 | afp listafp list3820,application/vnd.ibm.modcap 1695 | icc icm,application/vnd.iccprofile 1696 | xpw xpx,application/vnd.intercon.formnet 1697 | ktz ktr,application/vnd.kahootz 1698 | kpr kpt,application/vnd.kde.kpresenter 1699 | kwd kwt,application/vnd.kde.kword 1700 | kne knp,application/vnd.kinar 1701 | skp skd skt skm,application/vnd.koan 1702 | xls xlm xla xlc xlt xlw,application/vnd.ms-excel 1703 | ppt pps pot,application/vnd.ms-powerpoint 1704 | mpp mpt,application/vnd.ms-project 1705 | wps wks wcm wdb,application/vnd.ms-works 1706 | pdb pqa oprc,application/vnd.palm 1707 | qxd qxt qwd qwt qxl qxb,application/vnd.quark.quarkxpress 1708 | twd twds,application/vnd.simtech-mindmapper 1709 | sdkm sdkd,application/vnd.solent.sdkm+xml 1710 | sus susp,application/vnd.sus-calendar 1711 | sis sisx,application/vnd.symbian.install 1712 | ufd ufdl,application/vnd.ufdl 1713 | vsd vst vss vsw,application/vnd.visio 1714 | zir zirz,application/vnd.zul 1715 | aab x32 u32 vox,application/x-authorware-bin 1716 | bz2 boz,application/x-bzip2 1717 | deb udeb,application/x-debian-package 1718 | dir dcr dxr cst cct cxt w3d fgd swa,application/x-director 1719 | ttf ttc,application/x-font-ttf 1720 | pfa pfb pfm afm,application/x-font-type1 1721 | prc mobi,application/x-mobipocket-ebook 1722 | exe dll com bat msi,application/x-msdownload 1723 | mvb m13 m14,application/x-msmediaview 1724 | nc cdf,application/x-netcdf 1725 | p12 pfx,application/x-pkcs12 1726 | p7b spc,application/x-pkcs7-certificates 1727 | texinfo texi,application/x-texinfo 1728 | der crt,application/x-x509-ca-cert 1729 | xhtml xht,application/xhtml+xml 1730 | xml xsl,application/xml 1731 | mxml xhvml xvml xvm,application/xv+xml 1732 | au snd,audio/basic 1733 | mid midi kar rmi,audio/midi 1734 | mpga mp2 mp2a mp3 m2a m3a,audio/mpeg 1735 | oga ogg spx,audio/ogg 1736 | aif aiff aifc,audio/x-aiff 1737 | ram ra,audio/x-pn-realaudio 1738 | jpeg jpg jpe,image/jpeg 1739 | svg svgz,image/svg+xml 1740 | tiff tif,image/tiff 1741 | djvu djv,image/vnd.djvu 1742 | fh fhc fh4 fh5 fh7,image/x-freehand 1743 | pic pct,image/x-pict 1744 | eml mime,message/rfc822 1745 | igs iges,model/iges 1746 | msh mesh silo,model/mesh 1747 | wrl vrml,model/vrml 1748 | ics ifb,text/calendar 1749 | html htm,text/html 1750 | txt text conf def list log in,text/plain 1751 | sgml sgm,text/sgml 1752 | t tr roff man me ms,text/troff 1753 | uri uris urls,text/uri-list 1754 | s asm,text/x-asm 1755 | c cc cxx cpp h hh dic,text/x-c 1756 | f for f77 f90,text/x-fortran 1757 | p pas,text/x-pascal 1758 | jpm jpgm,video/jpm 1759 | mj2 mjp2,video/mj2 1760 | mp4 mp4v mpg4,video/mp4 1761 | mpeg mpg mpe m1v m2v,video/mpeg 1762 | qt mov,video/quicktime 1763 | mxu m4u,video/vnd.mpegurl 1764 | asf asx,video/x-ms-asf 1765 | --------------------------------------------------------------------------------