Closed gmelodie closed 1 year ago
currently you can run
pestuary --help
and the out put is
Usage: pestuary [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
add-string
autoretrieve-create
autoretrieve-heartbeat
autoretrieve-list
collection-commit
collection-create
collection-fs-list
collection-list
collection-list-content
content-add
content-add-ipfs
content-list
pin-create
pin-list
shuttle-create
and if you run something like
pestuary content-add --help
it returns info about that use case:
Usage: pestuary content-add [OPTIONS] PATH [CREATE_COLLECTION]
Options:
--help Show this message and exit.
I think this gets close to what we're looking for but not perfect.. a few minutes later i've been digging around with auto documentation tools.
pydoc which is built into python was able to make this page --
python -mpydoc -b pestuary
https://bl.ocks.org/snissn/raw/ac6658ee7592d8adb509b60e7eb364e8/?raw=true
which is amazingly hideous!!! what is python doing! ha but regardless this looks good assuming we run it through a site generator with a nice template. We'll just need to add docstrings to document our functions which would look like this:
def add_content_to_collection(coluuid, content_ids):
"""Add Content objects to a Collection"""
return collectionsApi.collections_coluuid_post(coluuid, content_ids)
Amazing!! Also agree that pydoc thing looks absolutely hideous. The --help
texts are much better as docs.
We should write a general information for each function on README so that people know more or less what function to use just by reading that. Something like:
pin_list
: list all pins on the estuary instancecontent_add
: adds content to estuary through/content/add