Miserlou / omnihash

Hash files, strings, input streams and network resources in various common algorithms simultaneously
https://github.com/Miserlou/omnihash
MIT License
251 stars 23 forks source link

Provide size of input (bytes) #13

Closed jgstew closed 7 years ago

jgstew commented 7 years ago

particularly in the case of files / URL contents, it would be useful if this could also output the size of the input at the end.

This is particularly useful if I want to hash a file from a URL in the case where I don't know the size already and I don't want to download it twice to find both the size and the hash.

Miserlou commented 7 years ago

+1, feel free to send PR. Thanks for using oh!

Miserlou commented 7 years ago

If you do get a chance to tackle this one, it'd be great if you could also make sure the output is properly formatted in the JSON output as well with bytes, type and name fields.

Miserlou commented 7 years ago

Are you gonna handle this one, @jgstew ? :-)

jgstew commented 7 years ago

Probably not anytime soon. I haven't started playing with Omnihash yet.

I did install it with PIP but I was having trouble figuring out how to run it directly.

ankostis commented 7 years ago

Would you like to explain what is the problem? pip should install 2 executables in your path: omnihash and oh

jgstew commented 7 years ago

See here: omnihash executable not in path https://github.com/Miserlou/omnihash/issues/18

ankostis commented 7 years ago

I guess you have git cloned the repo and you need to run the command from the sources, correct?

You have to install the project in "develop" mode. Cd to project s folder and type:

pip install -e .
jgstew commented 7 years ago

That is not the case, I figured it out here: https://github.com/Miserlou/omnihash/issues/18

pip is also not in my path, and omnihash is in the same folder, so it is specific to my config.