Add script to create basic RPC md file

Set up empty GetBlockHashes/Headers and GetSpentInfo RPCs
This commit is contained in:
thephez 2017-10-09 09:24:02 -04:00
parent 8a0e561d93
commit ac3b27cd7f
10 changed files with 115 additions and 3 deletions

View file

@ -0,0 +1,49 @@
#!/bin/bash
#echo "$# parameters"
#echo "$@";
PARAMCOUNT=$#
#echo "$PARAMCOUNT parameters"
if [ "$PARAMCOUNT" == 1 ]; then
FILENAME=${1,,}.md
RPCNAME=$1
echo "{% comment %}" >> $FILENAME
echo "This file is licensed under the MIT License (MIT) available on" >> $FILENAME
echo "http://opensource.org/licenses/MIT." >> $FILENAME
echo "{% endcomment %}" >> $FILENAME
echo '{% assign filename="_includes/devdoc/dash-core/rpcs/rpcs/'$FILENAME'" %}#' >> $FILENAME
echo "" >> $FILENAME
echo "##### '$RPCNAME'" >> $FILENAME
echo "{% include helpers/subhead-links.md %}" >> $FILENAME
echo "" >> $FILENAME
echo "{% autocrossref %}" >> $FILENAME
echo "" >> $FILENAME
echo "{% assign summary_${RPCNAME,}="" %}" >> $FILENAME
echo "" >> $FILENAME
echo "{% endautocrossref %}" >> $FILENAME
cat $FILENAME
echo " "
echo "Next copy the created file ('$FILENAME') to ../_includes/devdoc/dash-core/rpcs/rpcs"
else
echo "Incorrect number of parameters (Should be exactly 1)"
echo "Usage: create_empty_rpc_md RPCNAME"
echo "Example: create_empty_rpc_md GetBlock"
fi
#This file is licensed under the MIT License (MIT) available on
#http://opensource.org/licenses/MIT.
#{% endcomment %}
#{% assign filename="_includes/devdoc/dash-core/rpcs/rpcs/getaddressutxos.md" %}#
#
###### GetAddressUtxos
#{% include helpers/subhead-links.md %}
#
#{% autocrossref %}
#
#{% assign summary_getAddressUtxos="" %}
#
#
#{% endautocrossref %}