Skip to content

Latest commit

 

History

History
 
 

scripts

reformat-all-commands.sh

Calls reformat.py and convert_swagger.py to populate the "reference-docs" structure. Requires two arguments be passed referencing the source code of go-algorand and indexer respectively:

./reformat-all-commands.sh $GO_ALGORAND_SRC $INDEXER_SRC

reformat.py

Reformats markdown generated by the go spf13/cobra library to work with mkdocs.

Given the goal in the path, regenerate the docs from this directory by running:

rm -rf ../docs/Reference-Docs/goal
mkdir ../docs/Reference-Docs/goal
goal generate-docs ../docs/Reference-Docs/goal
./reformat.py -path ../docs/Reference-Docs/goal -cmd goal

convert_swagger.py

Given a swagger specfile, generates a markdown file. Currently uses swagger2markup, with some post processing to make the markdown more pleasant with our mkdocs theme.

./convert_swagger.py -specfile ~/algorand/indexer/api/indexer.oas2.json  -target ../docs/reference/rest-apis/indexer.md
./convert_swagger.py -specfile ~/go/src/github.com/algorand/go-algorand/daemon/kmd/api/swagger.json  -target ../docs/reference/rest-apis/kmd.md
./convert_swagger.py -specfile ~/go/src/github.com/algorand/go-algorand/daemon/algod/api/algod.oas2.json  -target ../docs/reference/rest-apis/algod.md

config_json_gen

Used to extract node config options from the go-algorand source. Markdown is written to stdout, warnings are written to stderr. To update the template, edit template.tmpl and rebuild the tool.

Build tool:

go build .

Run:

./config_json_gen -path ~/algorand/go-algorand/ > config.md