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

[Feature Request / Enhancement] hachoir-metadata CSV or JSON output to external file #11

Open
ivbeg opened this issue Mar 14, 2017 · 6 comments

Comments

@ivbeg
Copy link

ivbeg commented Mar 14, 2017

When I process multiple files it often require command-line tools to create CSV/JSON pipeline. Right now hachoir-metadata tool can't be used to create CSV or JSON.
It will be very helpful if hachoir-metadata and other cmd tools will produce machine readable results.

@vstinner
Copy link
Owner

I like the idea. Would you like to implement it? I would prefer to avoid code duplication.

@ivbeg
Copy link
Author

ivbeg commented Mar 14, 2017

I love to code just right now busy with other projects till next month. But I could donate and support this feature via https://www.bountysource.com/ for example. I think it's really useful

@vstinner
Copy link
Owner

I'm not interested by bounties, but maybe @nneonneo is?

@nneonneo
Copy link
Collaborator

Sure thing, I could take a bounty. I'm also really busy with work, but it could be a nice feature to work on.

@nneonneo
Copy link
Collaborator

Before I get too far into any of this: have you looked at hachoir.metadata.csv? This is exposed by the hachoir-metadata-csv script (which isn't installed by setup.py, but is in the repository).

@nosmokingbandit
Copy link
Contributor

nosmokingbandit commented Mar 18, 2017

@ivbeg
I unofficially created something like this a while ago for the python2 version of Hachior and just today converted it to python 3.

Look at this pull request #16

I was unaware of this issue when I submitted the PR, but I believe this would do what you want. I'm thinking about moving one of my projects to python 3, but it relies on the dictionary output I made for the python2 version. This is a quick and dirty conversion but I haven't gotten it to choke on anything yet.

Its trivial to json.dump() this output to a file.

I was looking through the issues to see if there is anything I need to know about before I convert my project to python 3 and I was somewhat amused when I saw this issue.

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

No branches or pull requests

4 participants