-
Notifications
You must be signed in to change notification settings - Fork 4
/
constant.py
executable file
·104 lines (100 loc) · 3.26 KB
/
constant.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# coding=utf-8
import platform
import sys
LOCAL_SYS = platform.system().lower()
SYS_ENCODING = sys.getfilesystemencoding()
IS_PYTHON2 = sys.version_info.major == 2 or sys.version < '3'
class ConfigFile(object):
FILE_CONFIG = 'config.dat'
CONTENT_TYPES = {
'html': "text/html",
'css': "text/css",
'xml': "text/xml",
'gif': "image/gif",
'jpeg': "image/jpeg",
'js': "application/javascript",
'atom': "application/atom+xml",
'rss': "application/rss+xml",
'mml': "text/mathml",
'txt': "text/plain",
'jad': "text/vnd.sun.j2me.app-descriptor",
'wml': "text/vnd.wap.wml",
'htc': "text/x-component",
'png': "image/png",
'tif': "image/tiff",
'wbmp': "image/vnd.wap.wbmp",
'ico': "image/x-icon",
'jng': "image/x-jng",
'bmp': "image/x-ms-bmp",
'svg': "image/svg+xml",
'webp': "image/webp",
'woff': "application/font-woff",
'jar': "application/java-archive",
'json': "application/json",
'hqx': "application/mac-binhex40",
'doc': "application/msword",
'pdf': "application/pdf",
'ps': "application/postscript",
'rtf': "application/rtf",
'm3u8': "application/vnd.apple.mpegurl",
'xls': "application/vnd.ms-excel",
'eot': "application/vnd.ms-fontobject",
'ppt': "application/vnd.ms-powerpoint",
'wmlc': "application/vnd.wap.wmlc",
'kml': "application/vnd.google-earth.kml+xml",
'kmz': "application/vnd.google-earth.kmz",
'7z': "application/x-7z-compressed",
'cco': "application/x-cocoa",
'jardiff': "application/x-java-archive-diff",
'jnlp': "application/x-java-jnlp-file",
'run': "application/x-makeself",
'pl': "application/x-perl",
'prc': "application/x-pilot",
'rar': "application/x-rar-compressed",
'rpm': "application/x-redhat-package-manager",
'sea': "application/x-sea",
'swf': "application/x-shockwave-flash",
'sit': "application/x-stuffit",
'tcl': "application/x-tcl",
'der': "application/x-x509-ca-cert",
'xpi': "application/x-xpinstall",
'xhtml': "application/xhtml+xml",
'xspf': "application/xspf+xml",
'zip': "application/zip",
'docx': "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
'xlsx': "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
'pptx': "application/vnd.openxmlformats-officedocument.presentationml.presentation",
'mid': "audio/midi",
'mp3': "audio/mpeg",
'ogg': "audio/ogg",
'm4a': "audio/x-m4a",
'ra': "audio/x-realaudio",
'3gpp': "video/3gpp",
'ts': "video/mp2t",
'mp4': "video/mp4",
'mpeg': "video/mpeg",
'mov': "video/quicktime",
'webm': "video/webm",
'flv': "video/x-flv",
'm4v': "video/x-m4v",
'mng': "video/x-mng",
'asx': "video/x-ms-asf",
'wmv': "video/x-ms-wmv",
'avi': "video/x-msvideo",
'htm': "text/html",
'jpg': "image/jpeg",
'tiff': "image/tiff",
'svgz': "image/svg+xml",
'war': "application/java-archive",
'eps': "application/postscript",
'pdb': "application/x-pilot",
'tk': "application/x-tcl",
'midi': "audio/midi",
'3gp': "video/3gpp",
'mpg': "video/mpeg",
'asf': "video/x-ms-asf",
'shtml': "text/html",
'ear': "application/java-archive",
'ai': "application/postscript",
'kar': "audio/midi"
}