exp/novicehelp wanted
Description
Work Items
-
ipfs dht findprovs: lists the full peerIDs of providers, one per line (https://github.com/ipfs/go-ipfs/pull/2560) -
ipfs dht findpeer: lists multiaddrs discovered for the given peer, one per line (https://github.com/ipfs/go-ipfs/pull/2560) -
ipfs dht get: outputs the single best value selected for that key (https://github.com/ipfs/go-ipfs/pull/2560) -
ipfs dht query: lists of closest peer IDs, one per line (https://github.com/ipfs/go-ipfs/pull/2560) -
ipfs dht put: lists the peer IDs of the peers that it stored a record with (https://github.com/ipfs/go-ipfs/pull/2560) - more clearly document the helptext across all commands (https://github.com/ipfs/go-ipfs/pull/2560)
- output all verbose output to stderr
- provide a flag for 'ifps dht get' that lists all records (not just the best one)
Summary
Today:
$ ipfs dht findprovs QmNmL1foPtvw25dWR41eeqW5YcLZJA5b3XoKrrBYUwKhnv
QmRc5iJERYKMjFsJ57jsxJhUjf86HL1WyqrQBTJrCCAnKN
* <peer.ID QmT3B2> says use <peer.ID QmPhm1> <peer.ID QmaL57> <peer.ID QmRv1G> <peer.ID QmYHk2> <peer.ID QmSoLn> <peer.ID QmXSyB> <peer.ID QmZyo1> <peer.ID QmRPhq> <peer.ID QmV7E3> <peer.ID QmNMeh>
* <peer.ID QmRv1G> says use <peer.ID QmPhm1> <peer.ID QmaL57> <peer.ID QmT3B2> <peer.ID QmSNEN> <peer.ID QmYHk2> <peer.ID QmSoLn> <peer.ID QmXSyB> <peer.ID QmZyo1> <peer.ID QmUZax> <peer.ID QmRPhq> <peer.ID QmV7E3> <peer.ID QmNMeh> <peer.ID QmUDHg> <peer.ID QmSoLj> <peer.ID Qmda2A> <peer.ID QmVhJf> <peer.ID QmfBPE> <peer.ID QmZY7M> <peer.ID QmR5Cr> <peer.ID QmaSfi>
Imagined output:
$ ipfs dht findprovs QmNmL1foPtvw25dWR41eeqW5YcLZJA5b3XoKrrBYUwKhnv
QmNh2nZ3tWc8hbAbGNmfQQN9TmPAkpwKztjH8xZvcrv3eF
QmSoLju6m7xTh3DuokvT3886QRYqxAzb1kShaanJgW36yx
QmSoLnSGccFuZQJzRadHn95W2CrSFmZuTdDWP8HXaHca9z
...
Important properties:
- no errors inlined into output (or, use stderr at least)
- simple, newline-delimited output that is immediately usable for unix programs
This makes the commands much friendlier to unix scripts -- IDs can be grabbed and fed into e.g. ipfs dht findpeer more or less directly! We could still retain a -s|--simple option that gives short PeerIDs for existing compatibility, and keep -v|--verbose for detailed human output.
cc @whyrusleeping