34 lines
761 B
Python
34 lines
761 B
Python
#!/usr/bin/env python3
|
|
|
|
|
|
|
|
mime_types = {
|
|
'html': 'text/html',
|
|
'txt': 'text/plain',
|
|
'css': 'text/css',
|
|
'xml': 'text/xml',
|
|
'gif': 'image/gif',
|
|
'jpg': 'image/jpeg',
|
|
'webp': 'image/webp',
|
|
'tiff': 'image/tiff',
|
|
'png': 'image/png',
|
|
'svg': 'image/svg+xml',
|
|
'ico': 'image/x-icon',
|
|
'bmp': 'image/x-ms-bmp',
|
|
'js': 'application/javascript',
|
|
'json': 'application/json',
|
|
'mp3': 'audio/mpeg',
|
|
'ogg': 'audio/ogg',
|
|
'm4a': 'audio/x-m4a',
|
|
'mp4': 'video/mp4',
|
|
'webm': 'video/webm',
|
|
'ttf': 'font/font-ttf',
|
|
'woff': 'font/font-woff',
|
|
'woff2': 'font/font-woff2',
|
|
'wast': 'application/wast',
|
|
'wasm': 'application/wasm',
|
|
'other': 'application/octet-stream'
|
|
}
|
|
|
|
def get_mimetype(name):
|
|
return mime_types.get(name) or mime_types['html'] |
Python
60.1%
JavaScript
37.6%
HTML
2.3%