Skip to content
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

support ms ooxml #48

Merged
merged 4 commits into from
Oct 26, 2018
Merged

support ms ooxml #48

merged 4 commits into from
Oct 26, 2018

Conversation

kumakichi
Copy link
Contributor

code comes from : file msooxml magic rule

Matchers is a map, and map iteration order is random, so maybe zip rule will be matched before msooxml rules, so i just simply add an array, to keep the same order as func register does

and, msooxml rules share the same check code, but i don't know how to merge them into one type, because type and checker seems to be binded when calling register

@h2non
Copy link
Owner

h2non commented Oct 25, 2018

This looks promising. Can you add some test and real file fixtures?

@kumakichi
Copy link
Contributor Author

OK, i just add 3 files, and modified MatchReader buffer size from 512 to 4096 to make test pass

but, 4096 bytes may not be enough for real files, according to file(1) magic for Microsoft Office XML

@h2non
Copy link
Owner

h2non commented Oct 25, 2018

Thanks. Let's see if the CI build passes and we can merge things.

@kumakichi
Copy link
Contributor Author

i just don't know why travis would fail, local test is ok

@kumakichi
Copy link
Contributor Author

i see, this is an import path problem, if i change import path in code from gopkg.in/h2non/filetype.v1/types to github.com/h2non/filetype/types, then everything will be ok

seems v1 will use cc14fdc

@h2non
Copy link
Owner

h2non commented Oct 25, 2018

Gotcha. Today I think using gopkg.in is a bit useless since we have godep and vgo solving the versioning consistency issue quite well. I think we can remote it.

@kumakichi
Copy link
Contributor Author

so, maybe this PR is OK now?

@h2non h2non merged commit d5c26eb into h2non:master Oct 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants