console: add `blob export`
no way right now from the console to emulate iroh get -o to obtain the content
Implementing this should be easy but there are some questions surrounding this: Mainly that knowing whether the blob represents a collection or not is part of a tag, not part of the blob. This means, similar as with #1746 that to do a meaningful export we can rely only on tagged data. This raises two questions:
- should this belong to the
blobcommand? I would argue yes from an user perspective. However the result of #1746 where the solution was to go with aBlobFormat::Rawbecause is the "correct" thing to do begs the question of how "pure" do we want the blobs api to be. Going with a raw format leans towards pure and low level, but very user unfriendly. Here the question is translated in the same fashion: Should this belong to the blobs api taking into account it depends on the higher layer tags? - if we do this, what do we do with untagged data then? My understanding is that right now there is no simple way to differentiate untagged blobs from blobs that belong to a collection. This means that if we go with "write the binary data of the blob when untagged" we export untagged collections just as data blobs.
Please note my concerns are here simply to try to achieve a blob api that is both user friendly and self consistent. Implementing this could be achieved in "simple" ways, but right now all solutions that are not extremely convoluted are either not consistent with the policies of other blob commands, or not user friendly
This is very much needed. Right now you can add stuff to iroh and create collections, but there is no obvious way to get these blobs out again.