ssbc/mdmanifest

Name: mdmanifest

Owner: Secure Scuttlebutt Consortium

Description: markdown manifests for muxrpc apis

Created: 2015-09-14 03:08:18.0

Updated: 2017-12-10 10:53:35.0

Pushed: 2016-03-02 01:09:17.0

Homepage: null

Size: 14

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Markdown Manifest

Uses a regular markdown form to produce muxrpc manifests and cli usage descriptions.

The form:

i-name

short description.

long, multiline description (optional).
long, multiline description (optional).
long, multiline description (optional).

ethod-name: type

od short description.

bash usage (optional)

js usage (optional)

od long, multiline description (optional).
od long, multiline description (optional).
od long, multiline description (optional).

Example:

ample-api

ple API, v1.0.0.

 is an example API, written by Paul Frazee.
 not a real API, but it would work with muxrpc.

ing: async

s a target machine.

ping {target string} [-n number]

ping(target, { n: })

arget: string, an IPv4/IPv6 address
pts:
 n: optional number, how many times to ping

s ICMP ping messages to the given target.
 wait 1 second between pings.

isten: source

ens for pings.

listen

listen()

 emit a string describing incoming pings, as they occur.

The api:

mdm = require('mdmanifest')

manifest(exampleMd)
> {
ng: 'async',
sten: 'source'


usage(exampleMd) 
> 
ple API, v1.0.0.

 is an example API, written by Paul Frazee.
 not a real API, but it would work with muxrpc.

ands:

ing    Pings a target machine.
isten  Listens for pings.


usage(exampleMd, { prefix: 'foo' })
> 
ple API, v1.0.0.

 is an example API, written by Paul Frazee.
 not a real API, but it would work with muxrpc.

ands:

oo.ping    Pings a target machine.
oo.listen  Listens for pings.


usage(exampleMd, { nameWidth: 20 }) 
> 
ple API, v1.0.0.

 is an example API, written by Paul Frazee.
 not a real API, but it would work with muxrpc.

ands:

ing                Pings a target machine.
isten              Listens for pings.


usage(exampleMd, 'ping')
>
s a target machine.

 {target string} [-n number]

target: string, an IPv4/IPv6 address
opts:
-   n: optional number, how many times to ping

s ICMP ping messages to the given target.
 wait 1 second between pings.


html(exampleMd) // standard HTML output

Command-line usage:

dmanifest?  ./mdm.js manifest ./test/valid-example.md 

ing": "async",
isten": "source"


dmanifest?  ./mdm.js html ./test/valid-example.md 
example-api</h1>
xample API, v1.0.0.</p>


dmanifest?  ./mdm.js usage ./test/valid-example.md 
ple API, v1.0.0.

 is an example API, written by Paul Frazee.
 not a real API, but it would work with muxrpc.

ands:
ng    Pings a target machine.
sten  Listens for pings.

dmanifest?  ./mdm.js usage ./test/valid-example.md ping
s a target machine.

 {target string} [-n number]

target: string, an IPv4/IPv6 address
opts:
-   n: optional number, how many times to ping

s ICMP ping messages to the given target.
 wait 1 second between pings.

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.