file_groups 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6990c650671a753c6ff1853c419835c1b82e570d36614de0c638eeb0355a2896
4
- data.tar.gz: 97b5c795725de6a9bd057dcb07b7df824fef111e7bacb7a4a26d225e3bc1a1d1
3
+ metadata.gz: b8e1f19fa502e68cd683a2cba279aa37fc7e8f4bcaf995308d3eda7933925770
4
+ data.tar.gz: c90cfbf8e773121de6b9a1ec58519b60c52091fb82c53e5cdee2554fda7abf2d
5
5
  SHA512:
6
- metadata.gz: 8da9abde5c23f3edf38f8f471c925c6937b977dd452b76a154cc8d90efadd1c44b03366dd51f693abfc4071818af403d579881c9256666beaf15fc46c040c902
7
- data.tar.gz: cb7c14be4aaeaa5cf8fdd09f354d5db3ef04b8ce4d71bfc0dc5697ed3fdd557ee4a8ab0d2cc34dbe1a180e9849dfd4e21a3a2480195d87eb58a21fd737eb6e54
6
+ metadata.gz: a89b49b827dffa022c2d14fc9f7472fa8a70c4d14b2fdeabb77d0bf1c1f6d12ed9d2400e91bfd3d37beaa195e66ccda26080c8462c3d53b4f90e7d253bae1e05
7
+ data.tar.gz: d42ab9e5a7560cda02ff214896c105c87fd7ba402bc5d1e45b5a7fa410fd2f8790c5240871942471d20afe82d66be07710dcb897007a8096b23f53e4840b6dae
data/.gitignore CHANGED
@@ -10,3 +10,6 @@
10
10
 
11
11
  # rspec failure tracking
12
12
  .rspec_status
13
+
14
+ # ignore generated files
15
+ lib
data/README.md CHANGED
@@ -1,14 +1,14 @@
1
1
  # `FileGroups`
2
2
 
3
- Common file extensions and MIME types, grouped by application and type.
3
+ File extensions and media types, grouped by application and type.
4
4
  Useful when you need to process or restrict processing to certain types of files.
5
5
 
6
6
  ## Usage
7
7
 
8
- Methods on `FileGroups` return an object containing a set of MIME
9
- types and file extensions. These are accessible via the `.mime_types` and `.extensions`
8
+ Methods on `FileGroups` return an object containing a set of media
9
+ types and file extensions. These are accessible via the `.media_types` and `.extensions`
10
10
  methods, which return an `Array` of `String`s. By default only commonly used values are returned.
11
- To return all know values pass `true` to either method, e.g., `object.mime_types(true)`
11
+ To return all know values pass `true` to either method, e.g., `object.media_types(true)`
12
12
 
13
13
  In some cases additional methods can be called on the object to further restrict the set.
14
14
 
@@ -16,13 +16,14 @@ Let's look at some examples.
16
16
 
17
17
  ### Images & Video
18
18
 
19
+ Retrieve a list of file extensions or media types used by images and video:
19
20
  ```rb
20
21
  require "file_groups"
21
22
 
22
- FileGroups.image.extensions # ["bmp", "gif", "ico", "jpeg", ... ]
23
- FileGroups.image.mime_types # ["image/bmp", "image/x-ms-bmp", "image/gif", ... ]
24
- FileGroups.video.extensions # ["asf", "mov", "qt", "movie", ... ]
25
- FileGroups.video.mime_types # ["video/x-ms-asf", "video/quicktime", ... ]
23
+ FileGroups.image.extensions # ["bmp", "gif", "ico", "jpeg", ... ]
24
+ FileGroups.image.media_types # ["image/bmp", "image/x-ms-bmp", "image/gif", ... ]
25
+ FileGroups.video.extensions # ["asf", "mov", "qt", "movie", ... ]
26
+ FileGroups.video.media_types # ["video/x-ms-asf", "video/quicktime", ... ]
26
27
  ```
27
28
 
28
29
  Images can be filtered on by raster, vector, or web:
@@ -34,28 +35,28 @@ FileGroups.image.vector.extensions # ["svg"]
34
35
 
35
36
  For a complete list pass in `true` to any of these methods:
36
37
  ```rb
37
- FileGroups.image.extensions(true) # ["bmp", "dib", "gif", "ico", "jfif", "jpe", "jpeg", ... ]
38
+ FileGroups.image.web.extensions(true) # ["bmp", "dib", "gif", "ico", "jfif", "jpe", "jpeg", ... ]
38
39
  ```
39
40
 
40
41
  ### Spreadsheets
41
42
 
42
- Retrieve a list of file extensions or MIME types used by spreadsheets
43
+ Retrieve a list of file extensions or media types used by spreadsheets:
43
44
  ```rb
44
45
  require "file_groups"
45
46
 
46
47
  FileGroups.spreadsheet.extensions # ["csv", "xls", "xlsx", "xlt", ... ]
47
- FileGroups.spreadsheet.mime_types # ["text/csv", "application/vnd.ms-excel", ... ]
48
+ FileGroups.spreadsheet.media_types # ["text/csv", "application/vnd.ms-excel", ... ]
48
49
  ```
49
50
 
50
51
  If you only want values specific to Microsoft Excel:
51
52
  ```rb
52
53
  FileGroups.spreadsheet.excel.extensions # ["xls", "xlsx", "xlt", "xltx", "xlw"]
53
- FileGroups.spreadsheet.excel.mime_types # ["application/vnd.ms-excel", ... ]
54
+ FileGroups.spreadsheet.excel.media_types # ["application/vnd.ms-excel", ... ]
54
55
  ```
55
56
 
56
- Or for OpenOffice:
57
+ Or for OpenOffice Calc:
57
58
  ```rb
58
- FileGroups.spreadsheet.openoffice.extensions # ["ods", "ots"]
59
+ FileGroups.spreadsheet.calc.extensions # ["ods", "ots"]
59
60
  ```
60
61
 
61
62
  By default these only return common extensions, to return all:
@@ -63,23 +64,9 @@ By default these only return common extensions, to return all:
63
64
  FileGroups.spreadsheet.excel.extensions(true) # ["xls", "xlsx", "xlt", "xltx", ... ]
64
65
  ```
65
66
 
66
- ### Office Productivity Files
67
+ ### Everything Else
67
68
 
68
- Retrieve a list of file extensions or MIME types used by common office software
69
-
70
- ```rb
71
- require "file_groups"
72
- FileGroups.document.extensions # ["csv", "key", "key-tef", "xls", "xlsx", "xlt ... ]
73
- FileGroups.document.mime_types # ["text/csv", "application/vnd.ms-excel", ... ]
74
- ```
75
-
76
- ### Other Filters
77
-
78
- See the documentation for more.
79
-
80
- ## Contributing
81
-
82
- See https://github.com/sshaw/file_groups (or ../README.md)
69
+ See [the list of categories and tags](https://github.com/sshaw/file_groups/blob/master/README.md#groups).
83
70
 
84
71
  ## Author
85
72
 
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Skye Shaw"]
10
10
  spec.email = ["skye.shaw@gmail.com"]
11
11
 
12
- spec.summary = %q{Common file extensions and MIME types, grouped by application and type}
13
- spec.description = %q{Common file extensions and MIME types, grouped by application and type. Useful when you need to process or restrict processing to certain types of files.}
12
+ spec.summary = %q{File extensions and media types, grouped by application and type}
13
+ spec.description = %q{File extensions and media types, grouped by application and type. Useful when you need to process or restrict processing to certain types of files.}
14
14
  spec.homepage = "https://github.com/sshaw/file_groups/tree/master/ruby"
15
15
  spec.license = "MIT"
16
16
 
@@ -22,8 +22,14 @@ Gem::Specification.new do |spec|
22
22
  spec.bindir = "exe"
23
23
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
24
  spec.require_paths = ["lib"]
25
+ spec.metadata = {
26
+ "changelog_uri" => "https://github.com/sshaw/file_groups/blob/master/Changes",
27
+ "bug_tracker_uri" => "https://github.com/sshaw/file_groups/issues",
28
+ "documentation_uri" => "http://rdoc.info/gems/file_groups",
29
+ "source_code_uri" => "https://github.com/sshaw/file_groups",
30
+ }
25
31
 
26
32
  spec.add_development_dependency "bundler", "~> 1.16"
27
- spec.add_development_dependency "rake", "~> 10.0"
33
+ spec.add_development_dependency "rake", ">= 12.3.3"
28
34
  spec.add_development_dependency "rspec", "~> 3.0"
29
35
  end
@@ -5,18 +5,18 @@
5
5
  # ********************
6
6
  #
7
7
  module FileGroups
8
- VERSION = "0.0.1"
8
+ VERSION = "0.1.0"
9
9
 
10
10
  <%- Util.groups(json).each do |method, record| %>
11
11
  def self.<%= method %>
12
12
  o = Object.new
13
13
 
14
14
  def o.extensions(all = false)
15
- (all ? <%= Util.extensions(record["files"], false) %> : <%= Util.extensions(record["files"], true) %>).dup
15
+ all ? <%= Util.extensions(record["files"], false) %> : <%= Util.extensions(record["files"], true) %>
16
16
  end
17
17
 
18
- def o.mime_types(all = false)
19
- (all ? <%= Util.mime_types(record["files"], false) %> : <%= Util.mime_types(record["files"], true) %>).dup
18
+ def o.media_types(all = false)
19
+ all ? <%= Util.mime_types(record["files"], false) %> : <%= Util.mime_types(record["files"], true) %>
20
20
  end
21
21
 
22
22
  <% record["tags"] && record["tags"].each do |tag, files| -%>
@@ -24,11 +24,11 @@ module FileGroups
24
24
  tag = Object.new
25
25
 
26
26
  def tag.extensions(all = false)
27
- (all ? <%= Util.extensions(files, false) %> : <%= Util.extensions(files, true) %>).dup
27
+ all ? <%= Util.extensions(files, false) %> : <%= Util.extensions(files, true) %>
28
28
  end
29
29
 
30
- def tag.mime_types(all = false)
31
- (all ? <%= Util.mime_types(files, false) %> : <%= Util.mime_types(files, true) %>).dup
30
+ def tag.media_types(all = false)
31
+ all ? <%= Util.mime_types(files, false) %> : <%= Util.mime_types(files, true) %>
32
32
  end
33
33
 
34
34
  tag
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: file_groups
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Skye Shaw
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-03 00:00:00.000000000 Z
11
+ date: 2020-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: 12.3.3
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: 12.3.3
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -52,8 +52,8 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
- description: Common file extensions and MIME types, grouped by application and type.
56
- Useful when you need to process or restrict processing to certain types of files.
55
+ description: File extensions and media types, grouped by application and type. Useful
56
+ when you need to process or restrict processing to certain types of files.
57
57
  email:
58
58
  - skye.shaw@gmail.com
59
59
  executables: []
@@ -65,12 +65,15 @@ files:
65
65
  - README.md
66
66
  - Rakefile
67
67
  - file_groups.gemspec
68
- - lib/file_groups.rb
69
68
  - template.erb
70
69
  homepage: https://github.com/sshaw/file_groups/tree/master/ruby
71
70
  licenses:
72
71
  - MIT
73
- metadata: {}
72
+ metadata:
73
+ changelog_uri: https://github.com/sshaw/file_groups/blob/master/Changes
74
+ bug_tracker_uri: https://github.com/sshaw/file_groups/issues
75
+ documentation_uri: http://rdoc.info/gems/file_groups
76
+ source_code_uri: https://github.com/sshaw/file_groups
74
77
  post_install_message:
75
78
  rdoc_options: []
76
79
  require_paths:
@@ -90,5 +93,5 @@ rubyforge_project:
90
93
  rubygems_version: 2.7.6
91
94
  signing_key:
92
95
  specification_version: 4
93
- summary: Common file extensions and MIME types, grouped by application and type
96
+ summary: File extensions and media types, grouped by application and type
94
97
  test_files: []
@@ -1,505 +0,0 @@
1
- # frozen_string_literal: true
2
- #
3
- # ********************
4
- # AUTOGENERATED FILE DO NOT MODIFY
5
- # ********************
6
- #
7
- module FileGroups
8
- VERSION = "0.0.1"
9
-
10
-
11
- def self.video
12
- o = Object.new
13
-
14
- def o.extensions(all = false)
15
- (all ? ["asf", "mov", "qt", "movie", "avi", "mpv2", "mp4", "mpe", "mpeg", "mpg", "webm"] : ["asf", "mov", "qt", "movie", "avi", "mp4", "mpeg", "mpg", "webm"]).dup
16
- end
17
-
18
- def o.mime_types(all = false)
19
- (all ? ["video/x-ms-asf", "video/quicktime", "video/x-sgi-movie", "video/x-msvideo", "video/mpeg", "video/mp4", "video/webm"] : ["video/x-ms-asf", "video/quicktime", "video/x-sgi-movie", "video/x-msvideo", "video/mp4", "video/mpeg", "video/webm"]).dup
20
- end
21
-
22
-
23
- o
24
- end
25
-
26
- def self.audio
27
- o = Object.new
28
-
29
- def o.extensions(all = false)
30
- (all ? ["au", "aif", "aiff", "aifc", "mp3", "rmi", "mid", "ra", "ram", "snd", "wav", "weba"] : ["au", "aif", "aiff", "aifc", "mp3", "rmi", "mid", "wav", "weba"]).dup
31
- end
32
-
33
- def o.mime_types(all = false)
34
- (all ? ["audio/basic", "audio/x-aiff", "audio/mpeg", "audio/mp3", "audio/mid", "audio/midi", "audio/x-pn-realaudio", "audio/x-realaudio", "audio/x-wav", "audio/wav", "audio/wave", "audio/webm"] : ["audio/basic", "audio/x-aiff", "audio/mpeg", "audio/mp3", "audio/mid", "audio/midi", "audio/x-wav", "audio/wav", "audio/wave", "audio/webm"]).dup
35
- end
36
-
37
-
38
- o
39
- end
40
-
41
- def self.image
42
- o = Object.new
43
-
44
- def o.extensions(all = false)
45
- (all ? ["bmp", "dib", "gif", "ico", "jfif", "jpe", "jpeg", "jpg", "pbm", "pgm", "png", "ppm", "rgb", "svg", "tif", "tiff", "webp", "xbm", "xpm"] : ["bmp", "gif", "ico", "jpeg", "jpg", "png", "svg", "tif", "tiff", "webp"]).dup
46
- end
47
-
48
- def o.mime_types(all = false)
49
- (all ? ["image/bmp", "image/x-ms-bmp", "image/gif", "image/x-icon", "image/vnd.microsoft.icon", "image/pipeg", "image/jpeg", "image/x-portable-bitmap", "image/x-portable-graymap", "image/png", "image/x-portable-pixmap", "image/x-rgb", "image/svg+xml", "image/tiff", "image/webp", "image/x-xbitmap", "image/x-xpixmap"] : ["image/bmp", "image/x-ms-bmp", "image/gif", "image/x-icon", "image/vnd.microsoft.icon", "image/jpeg", "image/png", "image/svg+xml", "image/tiff", "image/webp"]).dup
50
- end
51
-
52
- def o.raster
53
- tag = Object.new
54
-
55
- def tag.extensions(all = false)
56
- (all ? ["bmp", "dib", "gif", "ico", "jpe", "jpeg", "jpg", "ppm", "tif", "tiff", "webp"] : ["bmp", "gif", "ico", "jpeg", "jpg", "tif", "tiff", "webp"]).dup
57
- end
58
-
59
- def tag.mime_types(all = false)
60
- (all ? ["image/bmp", "image/x-ms-bmp", "image/gif", "image/x-icon", "image/vnd.microsoft.icon", "image/jpeg", "image/x-portable-pixmap", "image/tiff", "image/webp"] : ["image/bmp", "image/x-ms-bmp", "image/gif", "image/x-icon", "image/vnd.microsoft.icon", "image/jpeg", "image/tiff", "image/webp"]).dup
61
- end
62
-
63
- tag
64
- end
65
- def o.web
66
- tag = Object.new
67
-
68
- def tag.extensions(all = false)
69
- (all ? ["gif", "jpe", "jpeg", "jpg", "png", "svg"] : ["gif", "jpeg", "jpg", "png", "svg"]).dup
70
- end
71
-
72
- def tag.mime_types(all = false)
73
- (all ? ["image/gif", "image/jpeg", "image/png", "image/svg+xml"] : ["image/gif", "image/jpeg", "image/png", "image/svg+xml"]).dup
74
- end
75
-
76
- tag
77
- end
78
- def o.vector
79
- tag = Object.new
80
-
81
- def tag.extensions(all = false)
82
- (all ? ["svg"] : ["svg"]).dup
83
- end
84
-
85
- def tag.mime_types(all = false)
86
- (all ? ["image/svg+xml"] : ["image/svg+xml"]).dup
87
- end
88
-
89
- tag
90
- end
91
-
92
- o
93
- end
94
-
95
- def self.spreadsheet
96
- o = Object.new
97
-
98
- def o.extensions(all = false)
99
- (all ? ["csv", "xls", "xlsx", "xlt", "xltx", "xlw", "xla", "xlsm", "xlsb", "xltm", "xlam", "numbers", "ods", "ots", "tsv", "tab"] : ["csv", "xls", "xlsx", "xlt", "xltx", "xlw", "numbers", "ods", "ots", "tsv"]).dup
100
- end
101
-
102
- def o.mime_types(all = false)
103
- (all ? ["text/csv", "application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "application/vnd.ms-excel.sheet.macroenabled.12", "application/vnd.ms-excel.sheet.binary.macroenabled.12", "application/vnd.ms-excel.template.macroenabled.12", "application/vnd.ms-excel.addin.macroenabled.12", "application/vnd.apple.numbers", "application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.spreadsheet-template", "text/tab-separated-values"] : ["text/csv", "application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "application/vnd.apple.numbers", "application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.spreadsheet-template", "text/tab-separated-values"]).dup
104
- end
105
-
106
- def o.excel
107
- tag = Object.new
108
-
109
- def tag.extensions(all = false)
110
- (all ? ["xls", "xlsx", "xlt", "xltx", "xlw", "xla", "xlsm", "xlsb", "xltm", "xlam"] : ["xls", "xlsx", "xlt", "xltx", "xlw"]).dup
111
- end
112
-
113
- def tag.mime_types(all = false)
114
- (all ? ["application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "application/vnd.ms-excel.sheet.macroenabled.12", "application/vnd.ms-excel.sheet.binary.macroenabled.12", "application/vnd.ms-excel.template.macroenabled.12", "application/vnd.ms-excel.addin.macroenabled.12"] : ["application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.spreadsheetml.template"]).dup
115
- end
116
-
117
- tag
118
- end
119
- def o.apple
120
- tag = Object.new
121
-
122
- def tag.extensions(all = false)
123
- (all ? ["numbers"] : ["numbers"]).dup
124
- end
125
-
126
- def tag.mime_types(all = false)
127
- (all ? ["application/vnd.apple.numbers"] : ["application/vnd.apple.numbers"]).dup
128
- end
129
-
130
- tag
131
- end
132
- def o.numbers
133
- tag = Object.new
134
-
135
- def tag.extensions(all = false)
136
- (all ? ["numbers"] : ["numbers"]).dup
137
- end
138
-
139
- def tag.mime_types(all = false)
140
- (all ? ["application/vnd.apple.numbers"] : ["application/vnd.apple.numbers"]).dup
141
- end
142
-
143
- tag
144
- end
145
- def o.openoffice
146
- tag = Object.new
147
-
148
- def tag.extensions(all = false)
149
- (all ? ["ods", "ots"] : ["ods", "ots"]).dup
150
- end
151
-
152
- def tag.mime_types(all = false)
153
- (all ? ["application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.spreadsheet-template"] : ["application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.spreadsheet-template"]).dup
154
- end
155
-
156
- tag
157
- end
158
- def o.calc
159
- tag = Object.new
160
-
161
- def tag.extensions(all = false)
162
- (all ? ["ods", "ots"] : ["ods", "ots"]).dup
163
- end
164
-
165
- def tag.mime_types(all = false)
166
- (all ? ["application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.spreadsheet-template"] : ["application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.spreadsheet-template"]).dup
167
- end
168
-
169
- tag
170
- end
171
-
172
- o
173
- end
174
-
175
- def self.document
176
- o = Object.new
177
-
178
- def o.extensions(all = false)
179
- (all ? ["csv", "key", "key-tef", "kth", "apxl", "xls", "xlsx", "xlt", "xltx", "xlw", "xla", "xlsm", "xlsb", "xltm", "xlam", "ppt", "pptx", "pps", "ppsx", "ppa", "ppam", "pptm", "ppsm", "potm", "doc", "docx", "dot", "dotx", "dotm", "docm", "word", "w6w", "numbers", "ods", "ots", "odp", "odt", "ott", "oth", "odm", "page", "pdf", "rtf", "tsv", "tab", "txt", "text"] : ["csv", "key", "key-tef", "xls", "xlsx", "xlt", "xltx", "xlw", "ppt", "pptx", "pps", "ppsx", "doc", "docx", "dot", "dotx", "numbers", "ods", "ots", "odp", "odt", "ott", "page", "pdf", "rtf", "tsv", "txt", "text"]).dup
180
- end
181
-
182
- def o.mime_types(all = false)
183
- (all ? ["text/csv", "application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "application/vnd.ms-excel.sheet.macroenabled.12", "application/vnd.ms-excel.sheet.binary.macroenabled.12", "application/vnd.ms-excel.template.macroenabled.12", "application/vnd.ms-excel.addin.macroenabled.12", "application/vnd.ms-powerpoint", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "application/vnd.ms-powerpoint.addin.macroenabled.12", "application/vnd.ms-powerpoint.presentation.macroenabled.12", "application/vnd.ms-powerpoint.slideshow.macroenabled.12", "application/vnd.ms-powerpoint.template.macroenabled.12", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "application/vnd.ms-word.template.macroenabled.12", "application/vnd.ms-word.document.macroenabled.12", "application/vnd.apple.numbers", "application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.spreadsheet-template", "application/vnd.oasis.opendocument.presentation", "application/vnd.oasis.opendocument.text", "application/vnd.oasis.opendocument.text-template", "application/vnd.oasis.opendocument.text-web", "application/vnd.oasis.opendocument.text-master", "application/pdf", "application/rtf", "text/rtf", "text/tab-separated-values", "text/plain"] : ["text/csv", "application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "application/vnd.ms-powerpoint", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "application/vnd.apple.numbers", "application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.spreadsheet-template", "application/vnd.oasis.opendocument.presentation", "application/vnd.oasis.opendocument.text", "application/vnd.oasis.opendocument.text-template", "application/pdf", "application/rtf", "text/rtf", "text/tab-separated-values", "text/plain"]).dup
184
- end
185
-
186
- def o.apple
187
- tag = Object.new
188
-
189
- def tag.extensions(all = false)
190
- (all ? ["key", "key-tef", "kth", "apxl", "numbers", "page"] : ["key", "key-tef", "numbers", "page"]).dup
191
- end
192
-
193
- def tag.mime_types(all = false)
194
- (all ? ["application/vnd.apple.numbers"] : ["application/vnd.apple.numbers"]).dup
195
- end
196
-
197
- tag
198
- end
199
- def o.keynote
200
- tag = Object.new
201
-
202
- def tag.extensions(all = false)
203
- (all ? ["key", "key-tef", "kth", "apxl"] : ["key", "key-tef"]).dup
204
- end
205
-
206
- def tag.mime_types(all = false)
207
- (all ? [] : []).dup
208
- end
209
-
210
- tag
211
- end
212
- def o.excel
213
- tag = Object.new
214
-
215
- def tag.extensions(all = false)
216
- (all ? ["xls", "xlsx", "xlt", "xltx", "xlw", "xla", "xlsm", "xlsb", "xltm", "xlam"] : ["xls", "xlsx", "xlt", "xltx", "xlw"]).dup
217
- end
218
-
219
- def tag.mime_types(all = false)
220
- (all ? ["application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "application/vnd.ms-excel.sheet.macroenabled.12", "application/vnd.ms-excel.sheet.binary.macroenabled.12", "application/vnd.ms-excel.template.macroenabled.12", "application/vnd.ms-excel.addin.macroenabled.12"] : ["application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.spreadsheetml.template"]).dup
221
- end
222
-
223
- tag
224
- end
225
- def o.powerpoint
226
- tag = Object.new
227
-
228
- def tag.extensions(all = false)
229
- (all ? ["ppt", "pptx", "pps", "ppsx", "ppa", "ppam", "pptm", "ppsm", "potm"] : ["ppt", "pptx", "pps", "ppsx"]).dup
230
- end
231
-
232
- def tag.mime_types(all = false)
233
- (all ? ["application/vnd.ms-powerpoint", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "application/vnd.ms-powerpoint.addin.macroenabled.12", "application/vnd.ms-powerpoint.presentation.macroenabled.12", "application/vnd.ms-powerpoint.slideshow.macroenabled.12", "application/vnd.ms-powerpoint.template.macroenabled.12"] : ["application/vnd.ms-powerpoint", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "application/vnd.openxmlformats-officedocument.presentationml.slideshow"]).dup
234
- end
235
-
236
- tag
237
- end
238
- def o.word
239
- tag = Object.new
240
-
241
- def tag.extensions(all = false)
242
- (all ? ["doc", "docx", "dot", "dotx", "dotm", "docm", "word", "w6w"] : ["doc", "docx", "dot", "dotx"]).dup
243
- end
244
-
245
- def tag.mime_types(all = false)
246
- (all ? ["application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "application/vnd.ms-word.template.macroenabled.12", "application/vnd.ms-word.document.macroenabled.12"] : ["application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.wordprocessingml.template"]).dup
247
- end
248
-
249
- tag
250
- end
251
- def o.numbers
252
- tag = Object.new
253
-
254
- def tag.extensions(all = false)
255
- (all ? ["numbers"] : ["numbers"]).dup
256
- end
257
-
258
- def tag.mime_types(all = false)
259
- (all ? ["application/vnd.apple.numbers"] : ["application/vnd.apple.numbers"]).dup
260
- end
261
-
262
- tag
263
- end
264
- def o.openoffice
265
- tag = Object.new
266
-
267
- def tag.extensions(all = false)
268
- (all ? ["ods", "ots", "odp", "odt", "ott", "oth", "odm"] : ["ods", "ots", "odp", "odt", "ott"]).dup
269
- end
270
-
271
- def tag.mime_types(all = false)
272
- (all ? ["application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.spreadsheet-template", "application/vnd.oasis.opendocument.presentation", "application/vnd.oasis.opendocument.text", "application/vnd.oasis.opendocument.text-template", "application/vnd.oasis.opendocument.text-web", "application/vnd.oasis.opendocument.text-master"] : ["application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.spreadsheet-template", "application/vnd.oasis.opendocument.presentation", "application/vnd.oasis.opendocument.text", "application/vnd.oasis.opendocument.text-template"]).dup
273
- end
274
-
275
- tag
276
- end
277
- def o.calc
278
- tag = Object.new
279
-
280
- def tag.extensions(all = false)
281
- (all ? ["ods", "ots"] : ["ods", "ots"]).dup
282
- end
283
-
284
- def tag.mime_types(all = false)
285
- (all ? ["application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.spreadsheet-template"] : ["application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.spreadsheet-template"]).dup
286
- end
287
-
288
- tag
289
- end
290
- def o.impress
291
- tag = Object.new
292
-
293
- def tag.extensions(all = false)
294
- (all ? ["odp"] : ["odp"]).dup
295
- end
296
-
297
- def tag.mime_types(all = false)
298
- (all ? ["application/vnd.oasis.opendocument.presentation"] : ["application/vnd.oasis.opendocument.presentation"]).dup
299
- end
300
-
301
- tag
302
- end
303
- def o.writer
304
- tag = Object.new
305
-
306
- def tag.extensions(all = false)
307
- (all ? ["odt", "ott", "oth", "odm"] : ["odt", "ott"]).dup
308
- end
309
-
310
- def tag.mime_types(all = false)
311
- (all ? ["application/vnd.oasis.opendocument.text", "application/vnd.oasis.opendocument.text-template", "application/vnd.oasis.opendocument.text-web", "application/vnd.oasis.opendocument.text-master"] : ["application/vnd.oasis.opendocument.text", "application/vnd.oasis.opendocument.text-template"]).dup
312
- end
313
-
314
- tag
315
- end
316
- def o.pages
317
- tag = Object.new
318
-
319
- def tag.extensions(all = false)
320
- (all ? ["page"] : ["page"]).dup
321
- end
322
-
323
- def tag.mime_types(all = false)
324
- (all ? [] : []).dup
325
- end
326
-
327
- tag
328
- end
329
- def o.pdf
330
- tag = Object.new
331
-
332
- def tag.extensions(all = false)
333
- (all ? ["pdf"] : ["pdf"]).dup
334
- end
335
-
336
- def tag.mime_types(all = false)
337
- (all ? ["application/pdf"] : ["application/pdf"]).dup
338
- end
339
-
340
- tag
341
- end
342
-
343
- o
344
- end
345
-
346
- def self.presentation
347
- o = Object.new
348
-
349
- def o.extensions(all = false)
350
- (all ? ["key", "key-tef", "kth", "apxl", "ppt", "pptx", "pps", "ppsx", "ppa", "ppam", "pptm", "ppsm", "potm", "odp"] : ["key", "key-tef", "ppt", "pptx", "pps", "ppsx", "odp"]).dup
351
- end
352
-
353
- def o.mime_types(all = false)
354
- (all ? ["application/vnd.ms-powerpoint", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "application/vnd.ms-powerpoint.addin.macroenabled.12", "application/vnd.ms-powerpoint.presentation.macroenabled.12", "application/vnd.ms-powerpoint.slideshow.macroenabled.12", "application/vnd.ms-powerpoint.template.macroenabled.12", "application/vnd.oasis.opendocument.presentation"] : ["application/vnd.ms-powerpoint", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "application/vnd.oasis.opendocument.presentation"]).dup
355
- end
356
-
357
- def o.apple
358
- tag = Object.new
359
-
360
- def tag.extensions(all = false)
361
- (all ? ["key", "key-tef", "kth", "apxl"] : ["key", "key-tef"]).dup
362
- end
363
-
364
- def tag.mime_types(all = false)
365
- (all ? [] : []).dup
366
- end
367
-
368
- tag
369
- end
370
- def o.keynote
371
- tag = Object.new
372
-
373
- def tag.extensions(all = false)
374
- (all ? ["key", "key-tef", "kth", "apxl"] : ["key", "key-tef"]).dup
375
- end
376
-
377
- def tag.mime_types(all = false)
378
- (all ? [] : []).dup
379
- end
380
-
381
- tag
382
- end
383
- def o.powerpoint
384
- tag = Object.new
385
-
386
- def tag.extensions(all = false)
387
- (all ? ["ppt", "pptx", "pps", "ppsx", "ppa", "ppam", "pptm", "ppsm", "potm"] : ["ppt", "pptx", "pps", "ppsx"]).dup
388
- end
389
-
390
- def tag.mime_types(all = false)
391
- (all ? ["application/vnd.ms-powerpoint", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "application/vnd.ms-powerpoint.addin.macroenabled.12", "application/vnd.ms-powerpoint.presentation.macroenabled.12", "application/vnd.ms-powerpoint.slideshow.macroenabled.12", "application/vnd.ms-powerpoint.template.macroenabled.12"] : ["application/vnd.ms-powerpoint", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "application/vnd.openxmlformats-officedocument.presentationml.slideshow"]).dup
392
- end
393
-
394
- tag
395
- end
396
- def o.openoffice
397
- tag = Object.new
398
-
399
- def tag.extensions(all = false)
400
- (all ? ["odp"] : ["odp"]).dup
401
- end
402
-
403
- def tag.mime_types(all = false)
404
- (all ? ["application/vnd.oasis.opendocument.presentation"] : ["application/vnd.oasis.opendocument.presentation"]).dup
405
- end
406
-
407
- tag
408
- end
409
- def o.impress
410
- tag = Object.new
411
-
412
- def tag.extensions(all = false)
413
- (all ? ["odp"] : ["odp"]).dup
414
- end
415
-
416
- def tag.mime_types(all = false)
417
- (all ? ["application/vnd.oasis.opendocument.presentation"] : ["application/vnd.oasis.opendocument.presentation"]).dup
418
- end
419
-
420
- tag
421
- end
422
-
423
- o
424
- end
425
-
426
- def self.word_processing
427
- o = Object.new
428
-
429
- def o.extensions(all = false)
430
- (all ? ["doc", "docx", "dot", "dotx", "dotm", "docm", "word", "w6w", "odt", "ott", "oth", "odm", "page", "rtf", "txt", "text"] : ["doc", "docx", "dot", "dotx", "odt", "ott", "page", "rtf", "txt", "text"]).dup
431
- end
432
-
433
- def o.mime_types(all = false)
434
- (all ? ["application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "application/vnd.ms-word.template.macroenabled.12", "application/vnd.ms-word.document.macroenabled.12", "application/vnd.oasis.opendocument.text", "application/vnd.oasis.opendocument.text-template", "application/vnd.oasis.opendocument.text-web", "application/vnd.oasis.opendocument.text-master", "application/rtf", "text/rtf", "text/plain"] : ["application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "application/vnd.oasis.opendocument.text", "application/vnd.oasis.opendocument.text-template", "application/rtf", "text/rtf", "text/plain"]).dup
435
- end
436
-
437
- def o.word
438
- tag = Object.new
439
-
440
- def tag.extensions(all = false)
441
- (all ? ["doc", "docx", "dot", "dotx", "dotm", "docm", "word", "w6w"] : ["doc", "docx", "dot", "dotx"]).dup
442
- end
443
-
444
- def tag.mime_types(all = false)
445
- (all ? ["application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "application/vnd.ms-word.template.macroenabled.12", "application/vnd.ms-word.document.macroenabled.12"] : ["application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.wordprocessingml.template"]).dup
446
- end
447
-
448
- tag
449
- end
450
- def o.openoffice
451
- tag = Object.new
452
-
453
- def tag.extensions(all = false)
454
- (all ? ["odt", "ott", "oth", "odm"] : ["odt", "ott"]).dup
455
- end
456
-
457
- def tag.mime_types(all = false)
458
- (all ? ["application/vnd.oasis.opendocument.text", "application/vnd.oasis.opendocument.text-template", "application/vnd.oasis.opendocument.text-web", "application/vnd.oasis.opendocument.text-master"] : ["application/vnd.oasis.opendocument.text", "application/vnd.oasis.opendocument.text-template"]).dup
459
- end
460
-
461
- tag
462
- end
463
- def o.writer
464
- tag = Object.new
465
-
466
- def tag.extensions(all = false)
467
- (all ? ["odt", "ott", "oth", "odm"] : ["odt", "ott"]).dup
468
- end
469
-
470
- def tag.mime_types(all = false)
471
- (all ? ["application/vnd.oasis.opendocument.text", "application/vnd.oasis.opendocument.text-template", "application/vnd.oasis.opendocument.text-web", "application/vnd.oasis.opendocument.text-master"] : ["application/vnd.oasis.opendocument.text", "application/vnd.oasis.opendocument.text-template"]).dup
472
- end
473
-
474
- tag
475
- end
476
- def o.apple
477
- tag = Object.new
478
-
479
- def tag.extensions(all = false)
480
- (all ? ["page"] : ["page"]).dup
481
- end
482
-
483
- def tag.mime_types(all = false)
484
- (all ? [] : []).dup
485
- end
486
-
487
- tag
488
- end
489
- def o.pages
490
- tag = Object.new
491
-
492
- def tag.extensions(all = false)
493
- (all ? ["page"] : ["page"]).dup
494
- end
495
-
496
- def tag.mime_types(all = false)
497
- (all ? [] : []).dup
498
- end
499
-
500
- tag
501
- end
502
-
503
- o
504
- end
505
- end