-
Notifications
You must be signed in to change notification settings - Fork 604
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
mime magic for extensionless files #99
base: extensionless-filename
Are you sure you want to change the base?
mime magic for extensionless files #99
Conversation
Looks like I need to put some more thought into this, I like your table approach, so perhaps using a table might be a better approach here |
Sorry I didn't get back to you sooner on this. What do you mean by "my table approach"? |
IN the current incarnation of this, I'm getting back a list of typical extensions for the filetype, and I'm going through all of these, instead of doing that, perhaps it would be much better to just just fill in a lookup table and use it for the supported formats. |
I just took a closer look at your branch and I see what you're talking about. I agree that it would be better to have a lookup table of supported formats that maps mimetype to file extension. I'm going to add a couple of comments to your PR with a few things that I noticed but, assuming we can get this to play nicely with the rest of the package (meaning: the tests either pass or fail for known reasons, in which case we should fix the tests), this seems like a great thing to incorporate. |
Hi, |
This method actually uses the mime type to generate a list of possible extensions for the given mimetype, and tries them all. Obviously if one works, we get the results. I did run make all in tests, and it ran all the tests fine, I guess I'm missing a few test cases in travis-ci