Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Add docs cmd #105

Merged
merged 4 commits into from
Nov 13, 2023
Merged

Add docs cmd #105

merged 4 commits into from
Nov 13, 2023

Conversation

foxytanuki
Copy link
Member

@foxytanuki foxytanuki commented Nov 13, 2023

Purpose

We need automatically created markdown documents to simplify updating the https://github.com/mycel-domain/mycel-docs page.

How to generate docs

  1. make docker-build
  2. make serve
  3. docker exec -it [CONTAINER] myceld docs
  4. The markdown docs will be generated under docs/static/cmd . (They are ignored in git commit)

Reference

https://umarcor.github.io/cobra/#generating-markdown-docs-for-your-own-cobracommand

@foxytanuki
Copy link
Member Author

The sample of markdown generated by docs command:


myceld query registry list-top-level-domain

list all topLevelDomain

myceld query registry list-top-level-domain [flags]

Options

      --count-total        count total number of records in list-top-level-domain to query for
      --grpc-addr string   the gRPC endpoint to use for this chain
      --grpc-insecure      allow gRPC over insecure channels, if not TLS the server must use TLS
      --height int         Use a specific height to query state at (this can error if the node is pruning state)
  -h, --help               help for list-top-level-domain
      --limit uint         pagination limit of list-top-level-domain to query for (default 100)
      --node string        <host>:<port> to Tendermint RPC interface for this chain (default "tcp://localhost:26657")
      --offset uint        pagination offset of list-top-level-domain to query for
  -o, --output string      Output format (text|json) (default "text")
      --page uint          pagination page of list-top-level-domain to query for. This sets offset to a multiple of limit (default 1)
      --page-key string    pagination page-key of list-top-level-domain to query for
      --reverse            results are sorted in descending order

Options inherited from parent commands

      --chain-id string     The network chain ID (default "mycel")
      --home string         directory for config and data (default "/root/.mycel")
      --log_format string   The logging format (json|plain) (default "plain")
      --log_level string    The logging level (trace|debug|info|warn|error|fatal|panic) (default "info")
      --trace               print out full stack trace on errors

SEE ALSO

Auto generated by spf13/cobra on 12-Nov-2023

Copy link
Member

@taryune taryune left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@foxytanuki foxytanuki merged commit 61ddaf3 into main Nov 13, 2023
3 checks passed
@foxytanuki foxytanuki deleted the feat/foxy-docs-cmd branch November 13, 2023 17:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants