Closed yusefnapora closed 8 years ago
:+1:
Overall good, though some of the things I want to dump are not objects
It works for the raw json blobs, since it falls back to print(str(obj))
if the object dump fails. I haven't tried it on a thumbnail yet tho. I'm guessing that it will work for python 2, since str
and bytes
are equivalent. Although you'd have to redirect the console output to a file to save the image.
adds a
datastore_get
subcommand that accepts a multihash key and dumps the result to the console. Tries to use thereader.utils.dump
command for nice formatted output and falls back toprint
if that fails.usage:
Would like to have called it
datastore-get
but theadd_parser
command doesn't have a nice way to rename the dash to an underscore, and the dash would result in an invalid python attribute name. This seemed like the simplest way to go.