-
-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider switching to YAML or CSV #37
Comments
I'm honestly not sure whether I want to do this or not. Switching to CSV introduces a massive readability problem and forces empty fields for optional values, so that's not even open for discussion. Switching to a YAML (or other tagged) structure…it'll be somewhat more humane to edit, but I'm unconvinced that it's what I want. The format I use is both dense and documented—possibly not where you expect it to be, but it is documented (as a function comment on I am willing to be convinced, but the workflow that I've built around the current format (which has been through two or three revisions) is fairly efficient for me, the maintainer, to add/remove MIME types in bulk. Would it be acceptable to have a human-readable transform that I can document in Contributing.rdoc as a form that can be used for people who do more ad-hoc one-off changes? As that gets used, and as I play with it and build tools around it, it could potentially replace the current format. I won't pretend that my regex-parser for the format that I have is more efficient than Psych for performance purposes. # Build the type list from a file in the format:
#
# [*][!][os:]mt/st[<ws>@ext][<ws>:enc][<ws>'url-list][<ws>=docs]
#
# == *
# An unofficial MIME type. This should be used if and only if the MIME type
# is not properly specified (that is, not under either x-type or
# vnd.name.type).
#
# == !
# An obsolete MIME type. May be used with an unofficial MIME type.
#
# == os:
# Platform-specific MIME type definition.
#
# == mt
# The media type.
#
# == st
# The media subtype.
#
# == <ws>@ext
# The list of comma-separated extensions.
#
# == <ws>:enc
# The encoding.
#
# == <ws>'url-list
# The list of comma-separated URLs.
#
# == <ws>=docs
# The documentation string.
#
# That is, everything except the media type and the subtype is optional. The
# more information that's available, though, the richer the values that can
# be provided. |
The shipped format will be JSON. However, the repo will also have a set of YAML files that will be used to compile into the JSON format for editing purposes. |
A substantial upgrade to the mime-types library. Major features: - No longer compatible with Ruby 1.8. - Several major API changes and deprecations. - The default mime-types registry is now stored as JSON. - Improved developer tools. - Improved repackager tools. - Resolves #28, #36, #37, #43, and #44.
A substantial upgrade to the mime-types library. Major features: - No longer compatible with Ruby 1.8. - Several major API changes and deprecations. - The default mime-types registry is now stored as JSON. - Improved developer tools. - Improved repackager tools. - Resolves #28. - Resolves #36. - Resolves #37. - Resolves #43. - Resolves #44.
A substantial upgrade to the mime-types library. Major features: - No longer compatible with Ruby 1.8. - Several major API changes and deprecations. - The default mime-types registry is now stored as JSON. - Improved developer tools. - Improved repackager tools. - Fixes #28. - Fixes #36. - Fixes #37. - Fixes #43. - Fixes #44.
A substantial upgrade to the mime-types library. Major features: - No longer compatible with Ruby 1.8. - Several major API changes and deprecations. - The default mime-types registry is now stored as JSON. - Improved developer tools. - Improved repackager tools. - Fixes #28. - Fixes #36. - Fixes #37. - Fixes #42. - Fixes #43. - Fixes #44.
A substantial upgrade to the mime-types library. Major features: - No longer compatible with Ruby 1.8. - Several major API changes and deprecations. - The default mime-types registry is now stored as JSON. - Improved developer tools. - Improved repackager tools. - Fixes #28. - Fixes #36. - Fixes #37. - Fixes #42. - Fixes #43. - Fixes #44.
Consider storing your type lists in YAML or CSV. This would make it easier to edit in the future. It took me a while to understand the structure of your type lists.
The text was updated successfully, but these errors were encountered: