Commit graph

3 commits

Author SHA1 Message Date
David A. Harding
2c44b59d88
Dev Docs: Use Sed To Convert Tables To YAML
Run sed -i -f <this_file.sed> _includes/ref/bitcoin-core/rpcs/rpcs/* _includes/ref/bitcoin-core/rest/requests/get_* _includes/helpers/vars.md

    ## On lines that start with a pipe:
    /^|/ {
        ## Delete all table header/table body divider lines
        /|----/d;

        ## Escape all double quotes
        s/"/\\"/g;

        ## Replace lines that look like NTPD headers with a itemplate start block
        s/^| Name *| Type.*/{% itemplate ntpd1 %}/;

        ## Delete extraneous whitespace
        s/ *|/|/g;

        ## Replace the first pipe with "- name:" plus a start quote
        s/^| */- n: "/;

        ## Replace the remaining pipes, starting each one with a newline and two spaces
        s/| */"\n  t: "/;
        s/| */"\n  p: "/;
        s/| */"\n  d: "/;

        ## Add a close quote and an empty line after the last list item
        ## built from a single table row, except for the header row. This
        ## improves readability/maintainability
        /[^}]$/s/$/"\n/;
    }

    ## Replace the old table class with the itemplate close tag
    s/{:.ntpd}/{% enditemplate %}/
2015-02-20 15:39:10 -05:00
David A. Harding
73eb097dd4
Dev Docs: REST: Add Security Note & Reindex Note
Added both notes to both JSON-RPC and REST docs.

Suggested by Jonas Schnelli (thanks!)
2015-01-26 14:41:05 -05:00
David A. Harding
5f532c59da
Dev Docs: Add REST Documentation
* Uses same basic format as JSON-RPC documentation.

Closes #715
2015-01-26 11:29:07 -05:00