def inputexpand(input, label=None, settings=DiscoSettings()): from disco.ddfs import DDFS, istag if ispartitioned(input) and label is not False: return zip(*(parse_dir(i, label=label) for i in iterify(input))) if isiterable(input): return [inputlist(input, label=label, settings=settings)] if istag(input): ddfs = DDFS(settings=settings) return chainify(blobs for name, tags, blobs in ddfs.findtags(input)) return [input]
def inputexpand(input, partition=None, settings=DiscoSettings()): from disco.ddfs import DDFS, istag if ispartitioned(input) and partition is not False: return zip(*(parse_dir(i, partition=partition) for i in iterify(input))) if isiterable(input): return [inputlist(input, partition=partition, settings=settings)] if istag(input): ddfs = DDFS(settings=settings) return chainify(blobs for name, tags, blobs in ddfs.findtags(input)) return [input]
def urllist(url, partid=None, listdirs=True, ddfs=None): from disco.ddfs import DDFS, istag if istag(url): token = auth_token(url) ret = [] for name, tags, blobs in DDFS(ddfs).findtags(url, token=token): ret += blobs return ret if isiterable(url): return [list(url)] scheme, netloc, path = urlsplit(url) if scheme == 'dir' and listdirs: return parse_dir(url, partid=partid) return [url]