Table of Contents
bashdoc2md.sh
List of all functions in alphabetic order
getbashdoc()
Main function: parse given script and show markdown for all functions
It calls functions for atomar actions
👉🏼 see getFunctions()
👉🏼 see parseFunction()
👉🏼 see parseDocblock()
🌐 global string PARSED_SCRIPT nane of the bash script to parse
🌐 global string PARSED_FUNCTION nane of the function
🌐 global string PARSED_LINE line number
🌐 global string PARSED_DOC doc block of the current function
🌐 global string PREFIX_FUNCTION prefix string for headline with function name
🌐 global string REPOURL Source code URL
getFunctions()
Find all functions with long and short and create a uniq list
it returns lines [LINE]:[FUNCTION_NAME]. It is called by
👉🏼 see getbashdoc()
🌐 global string PARSED_SCRIPT nane of the bash script to parse
🟩 param string scriptname to parse
🏁 return string
getHeader()
Get markdown header: header in set level and name of script
🌐 global string PARSED_SCRIPT nane of the bash script to parse
🌐 global string PREFIX_SCRIPT prefix string for headline with script
🏁 return string
parseDocBlock()
Parse the doc block of a given function and show description, params, see
and global. It is called by
🌐 global ICO_GLOBAL icon
🌐 global ICO_OUTPUT icon
🌐 global ICO_PARAM icon
🌐 global ICO_PARAM_OPT icon
🌐 global ICO_SEE icon
🌐 global ICO_TODO icon
🌐 global ICO_RETURN icon
👉🏼 see getbashdoc()
🌐 global string PARSED_DOC doc block of the current function
parseFunction()
Parse a section for a given single function
and set global variables. It is called by
👉🏼 see getbashdoc()
🌐 global string PARSED_FUNCTION nane of the function
🌐 global string PARSED_LINE line number
🌐 global string PARSED_DOC doc block of the current function
🟩 param string file to parse
🟩 param string starting line with [LINE]:[FUNCTION_NAME]
setScript()
Set a bash script to parse
It sets the global variable.
🌐 global string PARSED_SCRIPT nane of the function
🟩 param string filename of bash script to parse
showHelp()
Show help with all cli parameters
Generated with Bashdoc v0.7