Open ivbeg opened 7 years ago
I like the idea. Would you like to implement it? I would prefer to avoid code duplication.
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
I'm not interested by bounties, but maybe @nneonneo is?
Sure thing, I could take a bounty. I'm also really busy with work, but it could be a nice feature to work on.
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).
@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 https://github.com/haypo/hachoir3/pull/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.
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.