Skip to content

rreinold/sh-to-markdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sh-to-markdown

Overview

Existing bash script documentation tools are lackluster, so I created a documentation generation tool that allows you to document bash scripts with typing, type links in markdown.

Formatting

Multi-line comments are detected as JSDoc comment blocks:

: '
@typedef myScript
@...
:

are interpreted in an identical fashion as JSDoc comments blocks:

/**
 * @typdef myScript
 * @...
 */

API

CLI

Example bash script:

deploy.sh

#!/bin/sh

: '
@typedef "deploy.sh"
@param {string} semver Semantic Version of Docker image, ex. 1.0.0-rc2
@param {number} timeout Timeout period between retries
:

buildImage (){ }

Generation

# sh2md deploy.sh > api.md

deploy.sh

Kind: global typedef

Param Type Description
semver string Semantic Version of Docker image, ex. 1.0.0-rc2
timeout number Timeout period between retries

Credit

dmd
jsdoc
jsdoc-api
jsdoc-parse

About

Bash script documentation to markdown

Resources

Stars

Watchers

Forks

Packages

No packages published