help wanted
Description
Hi. I've had some trouble pinning a large number of items, so Juan asked me to open a ticket here detailing my ideal UI.
- It would be neat if "ipfs pin add -r" could support multiple files, and/or text input. so i can use "ipfs pin add -r [listofhashes]" or "ipfs pin add -r [hashlist.txt]". Ideally, IPFS would run "ipfs refs" and retrieve a list of all the sub-hashes that are also to be pinned. Then, it would return something like "pinning 42 hashes, 237 subhashes." It would be nice to see a progress bar for each hash, as well as an indication that a hash being pinned indirectly had another hash as a parent.
- Error Handling. There MUST be some kind of error handling here. If something is being pinned and no blocks have been added within a given period of time, it should time out. At the end of the pin, IPFS should notify the user which pins have failed, with the option to export a list of broken pins to a file. Concurrency would also be useful here: E.G "ipfs pin add -r" would simultaneously try to pin multiple hashes. This way, if there was one hash with only a few seeds or no seeds, it would not prevent the rest of the pinning mechanism from completing. Concurrency should happen across hashes, NOT subhashes. If one hash containing many hashes is down, it is likely that most of the hashes contained within are also down. Identifying which hashes are unseeded is key here. This ability also will ultimately help the overall health of the network, by more easily identifying unseeded hashes we can more easily upload and fix.
- API support: For apps that are trying to build on top of this platform, having an API for pinning is pretty essential. Generally, the features outlined here should be duplicated in the API.
- "ipfs pin add -r" should also function in the same way as running "ipfs refs [hash] && ipfs get [hash] && ipfs pin add -r [hash]". Running multiple commands to successfully cache files is pretty wack.
- ipfs refs, ipfs get, and ipfs pin ought have clearer and more unified syntax. They're a little baffling. e.g. ipfs get runs recursively automatically, where ipfs pin does not. ipfs pin supports multiple hashes, while get and refs do not.