rubot-base 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,141 @@
1
+ module Rubot
2
+
3
+ # Copies pages from one wiki to another.
4
+ #
5
+ # Very mighty indeed:
6
+ #
7
+ # # The simple way
8
+ # Rubot.copy :remote, :local, :page => 'Some Page', :summary => 'simple copy'
9
+ #
10
+ # # :summary can be a string or a block
11
+ # Rubot.copy :local, :remote, :pages => ['First', 'Second'], :summary => lambda { |name| '"copy of #{name}" }
12
+ #
13
+ # # You can also give blocks for :names (transforms names) or :modify
14
+ # Rubot.copy :de, :en, :pages => some_array, :summary => 'check this out!',
15
+ # :names => lambda { |name| name.downcase.capitalize },
16
+ # :modify => lambda { |content| "Yet to be translatet!\n\n"+content }
17
+ #
18
+ # # Another example
19
+ # replace = Proc.new { |str| str.gsub 'Wikipedia', 'MyWiki' }
20
+ # Rubot.copy :wikipedia, :mywiki,
21
+ # :pages => ['Foo', 'Bar', 'Wikipedia:Bots'],
22
+ # :summary => 'I came up with all that on my own!',
23
+ # :names => replace,
24
+ # :modify => replace
25
+ def Rubot.copy(from, to, params)
26
+ params = { :pages => [],
27
+ :summary => 'no summary given',
28
+ :modify => lambda { |s| s },
29
+ :names => lambda { |s| s },
30
+ :retries => 5 }.merge params
31
+ from = Rubot[from] unless from.is_a? Server
32
+ to = Rubot[to] unless to.is_a? Server
33
+ params[:pages].push params[:page] if params[:page]
34
+ params.delete :page
35
+ if params[:pages].is_a? Array
36
+ params[:pages].each { |page| Rubot.copy from, to, params.merge({ :pages => page }) }
37
+ else
38
+ success = false
39
+ retries = params[:retries]
40
+ while retries > 0 and !success
41
+ success = try { to.write_page Rubot.value( params[:names], params[:pages] ),
42
+ Rubot.value( params[:modify], from.read_page(params[:pages]) ),
43
+ Rubot.value( params[:summary], params[:pages] ) }
44
+ retries =- 1
45
+ end
46
+ unless success
47
+ to.write_page Rubot.value( params[:names], params[:pages] ),
48
+ Rubot.value( params[:modify], from.read_page(params[:pages]) ),
49
+ Rubot.value( params[:summary], params[:pages] )
50
+ end
51
+ end
52
+ end
53
+
54
+
55
+ # Mass connects to wikis, like Rubot.new, just taking more than one interwiki name and every option can take a block
56
+ # that will take the interwiki name.
57
+ #
58
+ # Examples:
59
+ #
60
+ # Rubot.mass_connect :en, :nl, :host => 'localhost', :path => lambda { |iw| "/#{iw}/index.php"}
61
+ #
62
+ # hosts = { :en => 'page-does-not-exist.co.uk', :de => 'seite-gibt-es-nicht.de', :se => 'sidan-finns-inte.se' }
63
+ # Rubot.mass_connect :en, :de, :se, :host => lambda { |iw| hosts[iw] }
64
+ #
65
+ # For doing mass connects to wikipedia, see Rubot.wikipedia
66
+ def Rubot.mass_connect *params
67
+ wikis, options = [], {}
68
+ params.flatten!
69
+ params.each do |param|
70
+ case param
71
+ when String, Symbol, Fixnum
72
+ wikis.push param.to_sym
73
+ when Hash
74
+ options.merge! param
75
+ else
76
+ raise ArgumentError, 'wrong type of argument'
77
+ end
78
+ end
79
+ wikis.collect! { |iw| Rubot.new iw, (options.collect_hash { |k,v| { k => Rubot.value(v, iw) } }) }
80
+ (wikis[0] if wikis.length == 1) or wikis
81
+ end
82
+
83
+ # Loads a single server from a given config file, adapter/log config in the file will be ignored.
84
+ # An optional third parameter takes options to overwrite defaults / config file.
85
+ #
86
+ # Example:
87
+ # Rubot.server_from_config_file :en, 'wikipedia.yml', :username => 'jimmy', :password => 'hercules'
88
+ def Rubot.server_from_config_file(iw, file, options = {})
89
+ config = YAML.load(ERB.new(File.read(file)).result)
90
+ if config['server'][iw.to_s]
91
+ Rubot.new iw, (config['server'][iw.to_s].merge options).keys_to_sym
92
+ else
93
+ raise Error, "Server '#{iw}' not found in '#{file}'"
94
+ end
95
+ end
96
+
97
+ # Like Rubot.mass_connect, just that options are set per default to fit to wikipeda.
98
+ #
99
+ # Examples:
100
+ #
101
+ # # simple example
102
+ # Rubot.wikipedia :en, :fr, :nl, :de
103
+ #
104
+ # # of course you have the same magic like with mass_connect
105
+ # usernames = { :en => 'English_Bot', :se => 'Swedish Bot'}
106
+ # Rubot.wikipedia :en, :se, :username => lambda { |iw| usernames[iw] }, :password => 'qwerty'
107
+ #
108
+ # # I want wikibooks instead
109
+ # Rubot.wikipedia :fr, :nl, :host => lambda { |iw| "#{iw}.wikibooks.org"}
110
+ #
111
+ # # For just reading an Article
112
+ # Rubot.wikipedia(:en).read_page('Freifunk')
113
+ def Rubot.wikipedia *params
114
+ Rubot.mass_connect({:host => lambda { |iw| "#{iw}.wikibooks.org"},
115
+ :path => '/w/index.php',
116
+ :delay => 12 }, params)
117
+ end
118
+
119
+ class Server
120
+
121
+ # Uploads a file, takes to stings: file (with path) and summary
122
+ def upload_file(file, summary)
123
+ file.gsub('\\', '/') if RUBY_PLATFORM =~ /win/
124
+ upload file[/[^\/]*$/], summary, File.read(file)
125
+ end
126
+
127
+ # Options different from default_options, all options if parameter is true
128
+ def options(all_options = false)
129
+ all_options ? @options.dup : @options.reject { |key,value| Server.default_options[key] == value }
130
+ end
131
+
132
+ # Default options
133
+ def Server.default_options
134
+ @@default_options ||= Rubot.new(:to_be_dropped).options(true)
135
+ @@server[Rubot.default_family].delete :to_be_dropped
136
+ @@default_options
137
+ end
138
+
139
+ end
140
+
141
+ end
@@ -0,0 +1,453 @@
1
+ # mime types for extensions, since "mime/types" is outdated
2
+ MIME_TYPES = { "3dm" => "x-world/x-3dmf",
3
+ "3dmf" => "x-world/x-3dmf",
4
+ "a" => "application/octet-stream",
5
+ "aab" => "application/x-authorware-bin",
6
+ "aam" => "application/x-authorware-map",
7
+ "aas" => "application/x-authorware-seg",
8
+ "abc" => "text/vnd.abc",
9
+ "acgi" => "text/html",
10
+ "afl" => "video/animaflex",
11
+ "ai" => "application/postscript",
12
+ "aif" => "audio/aiff",
13
+ "aifc" => "audio/aiff",
14
+ "aiff" => "audio/aiff",
15
+ "aim" => "application/x-aim",
16
+ "aip" => "text/x-audiosoft-intra",
17
+ "ani" => "application/x-navi-animation",
18
+ "aos" => "application/x-nokia-9000-communicator-add-on-software",
19
+ "aps" => "application/mime",
20
+ "arc" => "application/octet-stream",
21
+ "arj" => "application/arj",
22
+ "art" => "image/x-jg",
23
+ "asf" => "video/x-ms-asf",
24
+ "asm" => "text/x-asm",
25
+ "asp" => "text/asp",
26
+ "asx" => "application/x-mplayer2",
27
+ "au" => "audio/basic",
28
+ "avi" => "application/x-troff-msvideo",
29
+ "avs" => "video/avs-video",
30
+ "bcpio" => "application/x-bcpio",
31
+ "bin" => "application/mac-binary",
32
+ "bm" => "image/bmp",
33
+ "bmp" => "image/bmp",
34
+ "boo" => "application/book",
35
+ "book" => "application/book",
36
+ "boz" => "application/x-bzip2",
37
+ "bsh" => "application/x-bsh",
38
+ "bz" => "application/x-bzip",
39
+ "bz2" => "application/x-bzip2",
40
+ "c" => "text/plain",
41
+ "c++" => "text/plain",
42
+ "cat" => "application/vnd.ms-pki.seccat",
43
+ "cc" => "text/plain",
44
+ "ccad" => "application/clariscad",
45
+ "cco" => "application/x-cocoa",
46
+ "cdf" => "application/cdf",
47
+ "cer" => "application/pkix-cert",
48
+ "cha" => "application/x-chat",
49
+ "chat" => "application/x-chat",
50
+ "class" => "application/java",
51
+ "com" => "application/octet-stream",
52
+ "conf" => "text/plain",
53
+ "cpio" => "application/x-cpio",
54
+ "cpp" => "text/x-c",
55
+ "cpt" => "application/mac-compactpro",
56
+ "crl" => "application/pkcs-crl",
57
+ "crt" => "application/pkix-cert",
58
+ "csh" => "application/x-csh",
59
+ "css" => "application/x-pointplus",
60
+ "cxx" => "text/plain",
61
+ "dcr" => "application/x-director",
62
+ "deepv" => "application/x-deepv",
63
+ "def" => "text/plain",
64
+ "der" => "application/x-x509-ca-cert",
65
+ "dif" => "video/x-dv",
66
+ "dir" => "application/x-director",
67
+ "dl" => "video/dl",
68
+ "doc" => "application/msword",
69
+ "dot" => "application/msword",
70
+ "dp" => "application/commonground",
71
+ "drw" => "application/drafting",
72
+ "dump" => "application/octet-stream",
73
+ "dv" => "video/x-dv",
74
+ "dvi" => "application/x-dvi",
75
+ "dwf" => "drawing/x-dwf (old)",
76
+ "dwg" => "application/acad",
77
+ "dxf" => "application/dxf",
78
+ "dxr" => "application/x-director",
79
+ "el" => "text/x-script.elisp",
80
+ "elc" => "application/x-bytecode.elisp",
81
+ "env" => "application/x-envoy",
82
+ "eps" => "application/postscript",
83
+ "erb" => "text/plain",
84
+ "es" => "application/x-esrehber",
85
+ "etx" => "text/x-setext",
86
+ "evy" => "application/envoy",
87
+ "exe" => "application/octet-stream",
88
+ "f" => "text/plain",
89
+ "f77" => "text/x-fortran",
90
+ "f90" => "text/plain",
91
+ "fdf" => "application/vnd.fdf",
92
+ "fif" => "application/fractals",
93
+ "fli" => "video/fli",
94
+ "flo" => "image/florian",
95
+ "flx" => "text/vnd.fmi.flexstor",
96
+ "fmf" => "video/x-atomic3d-feature",
97
+ "for" => "text/plain",
98
+ "fpx" => "image/vnd.fpx",
99
+ "frl" => "application/freeloader",
100
+ "funk" => "audio/make",
101
+ "g" => "text/plain",
102
+ "g3" => "image/g3fax",
103
+ "gif" => "image/gif",
104
+ "gl" => "video/gl",
105
+ "gsd" => "audio/x-gsm",
106
+ "gsm" => "audio/x-gsm",
107
+ "gsp" => "application/x-gsp",
108
+ "gss" => "application/x-gss",
109
+ "gtar" => "application/x-gtar",
110
+ "gz" => "application/x-compressed",
111
+ "gzip" => "application/x-gzip",
112
+ "h" => "text/plain",
113
+ "hdf" => "application/x-hdf",
114
+ "help" => "application/x-helpfile",
115
+ "hgl" => "application/vnd.hp-hpgl",
116
+ "hh" => "text/plain",
117
+ "hlb" => "text/x-script",
118
+ "hlp" => "application/hlp",
119
+ "hpg" => "application/vnd.hp-hpgl",
120
+ "hpgl" => "application/vnd.hp-hpgl",
121
+ "hqx" => "application/binhex",
122
+ "hta" => "application/hta",
123
+ "htc" => "text/x-component",
124
+ "htm" => "text/html",
125
+ "html" => "text/html",
126
+ "htmls" => "text/html",
127
+ "htt" => "text/webviewhtml",
128
+ "htx" => "text/html",
129
+ "ice" => "x-conference/x-cooltalk",
130
+ "ico" => "image/x-icon",
131
+ "idc" => "text/plain",
132
+ "ief" => "image/ief",
133
+ "iefs" => "image/ief",
134
+ "iges" => "application/iges",
135
+ "igs" => "application/iges",
136
+ "ima" => "application/x-ima",
137
+ "imap" => "application/x-httpd-imap",
138
+ "inf" => "application/inf",
139
+ "ins" => "application/x-internett-signup",
140
+ "ip" => "application/x-ip2",
141
+ "isu" => "video/x-isvideo",
142
+ "it" => "audio/it",
143
+ "iv" => "application/x-inventor",
144
+ "ivr" => "i-world/i-vrml",
145
+ "ivy" => "application/x-livescreen",
146
+ "jam" => "audio/x-jam",
147
+ "jav" => "text/plain",
148
+ "java" => "text/plain",
149
+ "jcm" => "application/x-java-commerce",
150
+ "jfif" => "image/jpeg",
151
+ "jfif-tbnl" => "image/jpeg",
152
+ "jpe" => "image/jpeg",
153
+ "jpeg" => "image/jpeg",
154
+ "jpg" => "image/jpeg",
155
+ "jps" => "image/x-jps",
156
+ "js" => "application/x-javascript",
157
+ "jut" => "image/jutvision",
158
+ "kar" => "audio/midi",
159
+ "ksh" => "application/x-ksh",
160
+ "la" => "audio/nspaudio",
161
+ "lam" => "audio/x-liveaudio",
162
+ "latex" => "application/x-latex",
163
+ "lha" => "application/lha",
164
+ "lhx" => "application/octet-stream",
165
+ "list" => "text/plain",
166
+ "lma" => "audio/nspaudio",
167
+ "log" => "text/plain",
168
+ "lsp" => "application/x-lisp",
169
+ "lst" => "text/plain",
170
+ "lsx" => "text/x-la-asf",
171
+ "ltx" => "application/x-latex",
172
+ "lzh" => "application/octet-stream",
173
+ "lzx" => "application/lzx",
174
+ "m" => "text/plain",
175
+ "m1v" => "video/mpeg",
176
+ "m2a" => "audio/mpeg",
177
+ "m2v" => "video/mpeg",
178
+ "m3u" => "audio/x-mpequrl",
179
+ "man" => "application/x-troff-man",
180
+ "map" => "application/x-navimap",
181
+ "mar" => "text/plain",
182
+ "mbd" => "application/mbedlet",
183
+ "mc$" => "application/x-magic-cap-package-1.0",
184
+ "mcd" => "application/mcad",
185
+ "mcf" => "image/vasa",
186
+ "mcp" => "application/netmc",
187
+ "me" => "application/x-troff-me",
188
+ "mht" => "message/rfc822",
189
+ "mhtml" => "message/rfc822",
190
+ "mid" => "application/x-midi",
191
+ "midi" => "application/x-midi",
192
+ "mif" => "application/x-frame",
193
+ "mime" => "message/rfc822",
194
+ "mjf" => "audio/x-vnd.audioexplosion.mjuicemediafile",
195
+ "mjpg" => "video/x-motion-jpeg",
196
+ "mm" => "application/base64",
197
+ "mme" => "application/base64",
198
+ "mod" => "audio/mod",
199
+ "moov" => "video/quicktime",
200
+ "mov" => "video/quicktime",
201
+ "movie" => "video/x-sgi-movie",
202
+ "mp2" => "audio/mpeg",
203
+ "mp3" => "audio/mpeg3",
204
+ "mpa" => "audio/mpeg",
205
+ "mpc" => "application/x-project",
206
+ "mpe" => "video/mpeg",
207
+ "mpeg" => "video/mpeg",
208
+ "mpg" => "audio/mpeg",
209
+ "mpga" => "audio/mpeg",
210
+ "mpp" => "application/vnd.ms-project",
211
+ "mpt" => "application/x-project",
212
+ "mpv" => "application/x-project",
213
+ "mpx" => "application/x-project",
214
+ "mrc" => "application/marc",
215
+ "ms" => "application/x-troff-ms",
216
+ "mv" => "video/x-sgi-movie",
217
+ "my" => "audio/make",
218
+ "mzz" => "application/x-vnd.audioexplosion.mzz",
219
+ "nap" => "image/naplps",
220
+ "naplps" => "image/naplps",
221
+ "nc" => "application/x-netcdf",
222
+ "ncm" => "application/vnd.nokia.configuration-message",
223
+ "nif" => "image/x-niff",
224
+ "niff" => "image/x-niff",
225
+ "nix" => "application/x-mix-transfer",
226
+ "nsc" => "application/x-conference",
227
+ "nvd" => "application/x-navidoc",
228
+ "o" => "application/octet-stream",
229
+ "oda" => "application/oda",
230
+ "omc" => "application/x-omc",
231
+ "omcd" => "application/x-omcdatamaker",
232
+ "omcr" => "application/x-omcregerator",
233
+ "p" => "text/x-pascal",
234
+ "p10" => "application/pkcs10",
235
+ "p12" => "application/pkcs-12",
236
+ "p7a" => "application/x-pkcs7-signature",
237
+ "p7c" => "application/pkcs7-mime",
238
+ "p7m" => "application/pkcs7-mime",
239
+ "p7r" => "application/x-pkcs7-certreqresp",
240
+ "p7s" => "application/pkcs7-signature",
241
+ "part" => "application/pro_eng",
242
+ "pas" => "text/pascal",
243
+ "pbm" => "image/x-portable-bitmap",
244
+ "pcl" => "application/vnd.hp-pcl",
245
+ "pct" => "image/x-pict",
246
+ "pcx" => "image/x-pcx",
247
+ "pdb" => "chemical/x-pdb",
248
+ "pdf" => "application/pdf",
249
+ "pfunk" => "audio/make",
250
+ "pgm" => "image/x-portable-graymap",
251
+ "pic" => "image/pict",
252
+ "pict" => "image/pict",
253
+ "pkg" => "application/x-newton-compatible-pkg",
254
+ "pko" => "application/vnd.ms-pki.pko",
255
+ "pl" => "text/plain",
256
+ "plx" => "application/x-pixclscript",
257
+ "pm" => "image/x-xpixmap",
258
+ "pm4" => "application/x-pagemaker",
259
+ "pm5" => "application/x-pagemaker",
260
+ "png" => "image/png",
261
+ "pnm" => "application/x-portable-anymap",
262
+ "pot" => "application/mspowerpoint",
263
+ "pov" => "model/x-pov",
264
+ "ppa" => "application/vnd.ms-powerpoint",
265
+ "ppm" => "image/x-portable-pixmap",
266
+ "pps" => "application/mspowerpoint",
267
+ "ppt" => "application/mspowerpoint",
268
+ "ppz" => "application/mspowerpoint",
269
+ "pre" => "application/x-freelance",
270
+ "prt" => "application/pro_eng",
271
+ "ps" => "application/postscript",
272
+ "psd" => "application/octet-stream",
273
+ "pvu" => "paleovu/x-pv",
274
+ "pwz" => "application/vnd.ms-powerpoint",
275
+ "py" => "text/x-script.phyton",
276
+ "pyc" => "applicaiton/x-bytecode.python",
277
+ "qcp" => "audio/vnd.qcelp",
278
+ "qd3" => "x-world/x-3dmf",
279
+ "qd3d" => "x-world/x-3dmf",
280
+ "qif" => "image/x-quicktime",
281
+ "qt" => "video/quicktime",
282
+ "qtc" => "video/x-qtc",
283
+ "qti" => "image/x-quicktime",
284
+ "qtif" => "image/x-quicktime",
285
+ "ra" => "audio/x-pn-realaudio",
286
+ "ram" => "audio/x-pn-realaudio",
287
+ "ras" => "application/x-cmu-raster",
288
+ "rast" => "image/cmu-raster",
289
+ "rb" => "text/plain",
290
+ "rexx" => "text/x-script.rexx",
291
+ "rf" => "image/vnd.rn-realflash",
292
+ "rgb" => "image/x-rgb",
293
+ "rm" => "application/vnd.rn-realmedia",
294
+ "rmi" => "audio/mid",
295
+ "rmm" => "audio/x-pn-realaudio",
296
+ "rmp" => "audio/x-pn-realaudio",
297
+ "rng" => "application/ringing-tones",
298
+ "rnx" => "application/vnd.rn-realplayer",
299
+ "roff" => "application/x-troff",
300
+ "rp" => "image/vnd.rn-realpix",
301
+ "rpm" => "audio/x-pn-realaudio-plugin",
302
+ "rt" => "text/richtext",
303
+ "rtf" => "application/rtf",
304
+ "rtx" => "application/rtf",
305
+ "rv" => "video/vnd.rn-realvideo",
306
+ "s" => "text/x-asm",
307
+ "s3m" => "audio/s3m",
308
+ "saveme" => "application/octet-stream",
309
+ "sbk" => "application/x-tbook",
310
+ "scm" => "application/x-lotusscreencam",
311
+ "sdml" => "text/plain",
312
+ "sdp" => "application/sdp",
313
+ "sdr" => "application/sounder",
314
+ "sea" => "application/sea",
315
+ "set" => "application/set",
316
+ "sgm" => "text/sgml",
317
+ "sgml" => "text/sgml",
318
+ "sh" => "application/x-bsh",
319
+ "shar" => "application/x-bsh",
320
+ "shtml" => "text/html",
321
+ "sid" => "audio/x-psid",
322
+ "sit" => "application/x-sit",
323
+ "skd" => "application/x-koan",
324
+ "skm" => "application/x-koan",
325
+ "skp" => "application/x-koan",
326
+ "skt" => "application/x-koan",
327
+ "sl" => "application/x-seelogo",
328
+ "smi" => "application/smil",
329
+ "smil" => "application/smil",
330
+ "snd" => "audio/basic",
331
+ "sol" => "application/solids",
332
+ "spc" => "application/x-pkcs7-certificates",
333
+ "spl" => "application/futuresplash",
334
+ "spr" => "application/x-sprite",
335
+ "sprite" => "application/x-sprite",
336
+ "src" => "application/x-wais-source",
337
+ "ssi" => "text/x-server-parsed-html",
338
+ "ssm" => "application/streamingmedia",
339
+ "sst" => "application/vnd.ms-pki.certstore",
340
+ "step" => "application/step",
341
+ "stl" => "application/sla",
342
+ "stp" => "application/step",
343
+ "sv4cpio" => "application/x-sv4cpio",
344
+ "sv4crc" => "application/x-sv4crc",
345
+ "svf" => "image/vnd.dwg",
346
+ "svr" => "application/x-world",
347
+ "svg" => "application/xml",
348
+ "swf" => "application/x-shockwave-flash",
349
+ "t" => "application/x-troff",
350
+ "talk" => "text/x-speech",
351
+ "tar" => "application/x-tar",
352
+ "tbk" => "application/toolbook",
353
+ "tcl" => "application/x-tcl",
354
+ "tcsh" => "text/x-script.tcsh",
355
+ "tex" => "application/x-tex",
356
+ "texi" => "application/x-texinfo",
357
+ "texinfo" => "application/x-texinfo",
358
+ "text" => "application/plain",
359
+ "tgz" => "application/gnutar",
360
+ "tif" => "image/tiff",
361
+ "tiff" => "image/tiff",
362
+ "tr" => "application/x-troff",
363
+ "tsi" => "audio/tsp-audio",
364
+ "tsp" => "application/dsptype",
365
+ "tsv" => "text/tab-separated-values",
366
+ "turbot" => "image/florian",
367
+ "txt" => "text/plain",
368
+ "uil" => "text/x-uil",
369
+ "uni" => "text/uri-list",
370
+ "unis" => "text/uri-list",
371
+ "unv" => "application/i-deas",
372
+ "uri" => "text/uri-list",
373
+ "uris" => "text/uri-list",
374
+ "ustar" => "application/x-ustar",
375
+ "uu" => "application/octet-stream",
376
+ "uue" => "text/x-uuencode",
377
+ "vcd" => "application/x-cdlink",
378
+ "vcs" => "text/x-vcalendar",
379
+ "vda" => "application/vda",
380
+ "vdo" => "video/vdo",
381
+ "vew" => "application/groupwise",
382
+ "viv" => "video/vivo",
383
+ "vivo" => "video/vivo",
384
+ "vmd" => "application/vocaltec-media-desc",
385
+ "vmf" => "application/vocaltec-media-file",
386
+ "voc" => "audio/voc",
387
+ "vos" => "video/vosaic",
388
+ "vox" => "audio/voxware",
389
+ "vqe" => "audio/x-twinvq-plugin",
390
+ "vqf" => "audio/x-twinvq",
391
+ "vql" => "audio/x-twinvq-plugin",
392
+ "vrml" => "application/x-vrml",
393
+ "vrt" => "x-world/x-vrt",
394
+ "vsd" => "application/x-visio",
395
+ "vst" => "application/x-visio",
396
+ "vsw" => "application/x-visio",
397
+ "w60" => "application/wordperfect6.0",
398
+ "w61" => "application/wordperfect6.1",
399
+ "w6w" => "application/msword",
400
+ "wav" => "audio/wav",
401
+ "wb1" => "application/x-qpro",
402
+ "wbmp" => "image/vnd.wap.wbmp",
403
+ "web" => "application/vnd.xara",
404
+ "wiz" => "application/msword",
405
+ "wk1" => "application/x-123",
406
+ "wmf" => "windows/metafile",
407
+ "wml" => "text/vnd.wap.wml",
408
+ "wmlc" => "application/vnd.wap.wmlc",
409
+ "wmls" => "text/vnd.wap.wmlscript",
410
+ "wmlsc" => "application/vnd.wap.wmlscriptc",
411
+ "word" => "application/msword",
412
+ "wp" => "application/wordperfect",
413
+ "wp5" => "application/wordperfect",
414
+ "wp6" => "application/wordperfect",
415
+ "wpd" => "application/wordperfect",
416
+ "wq1" => "application/x-lotus",
417
+ "wri" => "application/mswrite",
418
+ "wrl" => "application/x-world",
419
+ "wrz" => "model/vrml",
420
+ "wsc" => "text/scriplet",
421
+ "wsrc" => "application/x-wais-source",
422
+ "wtk" => "application/x-wintalk",
423
+ "x-png" => "image/png",
424
+ "xbm" => "image/x-xbitmap",
425
+ "xdr" => "video/x-amt-demorun",
426
+ "xgz" => "xgl/drawing",
427
+ "xif" => "image/vnd.xiff",
428
+ "xl" => "application/excel",
429
+ "xla" => "application/excel",
430
+ "xlb" => "application/excel",
431
+ "xlc" => "application/excel",
432
+ "xld" => "application/excel",
433
+ "xlk" => "application/excel",
434
+ "xll" => "application/excel",
435
+ "xlm" => "application/excel",
436
+ "xls" => "application/excel",
437
+ "xlt" => "application/excel",
438
+ "xlv" => "application/excel",
439
+ "xlw" => "application/excel",
440
+ "xm" => "audio/xm",
441
+ "xml" => "application/xml",
442
+ "xmz" => "xgl/movie",
443
+ "xpix" => "application/x-vnd.ls-xpix",
444
+ "xpm" => "image/x-xpixmap",
445
+ "xsr" => "video/x-amt-showrun",
446
+ "xwd" => "image/x-xwd",
447
+ "xyz" => "chemical/x-pdb",
448
+ "yaml" => "text/plain",
449
+ "yml" => "text/plain",
450
+ "z" => "application/x-compressed",
451
+ "zip" => "application/x-compressed",
452
+ "zoo" => "application/octet-stream",
453
+ "zsh" => "text/x-script.zsh" }