diff --git a/doc/app/associate.markdown b/doc/app/associate.markdown index f62aa210..c56bb873 100644 --- a/doc/app/associate.markdown +++ b/doc/app/associate.markdown @@ -1,4 +1,4 @@ -# app associate +# app associate <id> Use this command to associate a project directory with a resin application. diff --git a/doc/app/create.markdown b/doc/app/create.markdown index 693fe90e..418ba09b 100644 --- a/doc/app/create.markdown +++ b/doc/app/create.markdown @@ -1,4 +1,4 @@ -# app create +# app create <name> Use this command to create a new resin.io application. @@ -16,6 +16,6 @@ Examples: ## Options -### --type, -t +### --type, -t <type> application type \ No newline at end of file diff --git a/doc/app/info.markdown b/doc/app/info.markdown index 5239e4ec..2cedfca9 100644 --- a/doc/app/info.markdown +++ b/doc/app/info.markdown @@ -1,4 +1,4 @@ -# app +# app <id> Use this command to show detailed information for a single application. diff --git a/doc/app/remove.markdown b/doc/app/remove.markdown index 9f494e42..674c2709 100644 --- a/doc/app/remove.markdown +++ b/doc/app/remove.markdown @@ -1,4 +1,4 @@ -# app rm +# app rm <id> Use this command to remove a resin.io application. diff --git a/doc/app/restart.markdown b/doc/app/restart.markdown index ce0da7cd..8227fdd0 100644 --- a/doc/app/restart.markdown +++ b/doc/app/restart.markdown @@ -1,4 +1,4 @@ -# app restart +# app restart <id> Use this command to restart all devices that belongs to a certain application. diff --git a/doc/auth/login.markdown b/doc/auth/login.markdown index 19c86312..4c345859 100644 --- a/doc/auth/login.markdown +++ b/doc/auth/login.markdown @@ -13,10 +13,10 @@ Examples: ## Options -### --username, -u +### --username, -u <username> user name -### --password, -p +### --password, -p <password> user password \ No newline at end of file diff --git a/doc/auth/signup.markdown b/doc/auth/signup.markdown index b01a7597..6618ec80 100644 --- a/doc/auth/signup.markdown +++ b/doc/auth/signup.markdown @@ -18,14 +18,14 @@ Examples: ## Options -### --email, -e +### --email, -e <email> user email -### --username, -u +### --username, -u <username> user name -### --password, -p +### --password, -p <user password> user password \ No newline at end of file diff --git a/doc/device/identify.markdown b/doc/device/identify.markdown index e9097f8f..930efa6a 100644 --- a/doc/device/identify.markdown +++ b/doc/device/identify.markdown @@ -1,4 +1,4 @@ -# device identify +# device identify <uuid> Use this command to identify a device. diff --git a/doc/device/info.markdown b/doc/device/info.markdown index b72ddccc..65e5f9fa 100644 --- a/doc/device/info.markdown +++ b/doc/device/info.markdown @@ -1,4 +1,4 @@ -# device +# device <id> Use this command to show information about a single device. diff --git a/doc/device/init.markdown b/doc/device/init.markdown index 43812ca7..77662554 100644 --- a/doc/device/init.markdown +++ b/doc/device/init.markdown @@ -32,18 +32,18 @@ Examples: ## Options -### --application, --a,app, --a,app +### --application, --a,app, --a,app <application> application id -### --network, -n +### --network, -n <network> network type -### --ssid, -s +### --ssid, -s <ssid> wifi ssid, if network is wifi -### --key, -k +### --key, -k <key> wifi key, if network is wifi \ No newline at end of file diff --git a/doc/device/list.markdown b/doc/device/list.markdown index c14c58bb..4f8e8fa1 100644 --- a/doc/device/list.markdown +++ b/doc/device/list.markdown @@ -8,6 +8,6 @@ Examples: ## Options -### --application, --a,app, --a,app +### --application, --a,app, --a,app <application> application id \ No newline at end of file diff --git a/doc/device/remove.markdown b/doc/device/remove.markdown index 2c94e44c..f7c332d2 100644 --- a/doc/device/remove.markdown +++ b/doc/device/remove.markdown @@ -1,4 +1,4 @@ -# device rm +# device rm <id> Use this command to remove a device from resin.io. diff --git a/doc/device/rename.markdown b/doc/device/rename.markdown index e0c70d40..ce709a85 100644 --- a/doc/device/rename.markdown +++ b/doc/device/rename.markdown @@ -1,4 +1,4 @@ -# device rename [name] +# device rename <id> [name] Use this command to rename a device. diff --git a/doc/environment-variables/add.markdown b/doc/environment-variables/add.markdown index 5fd77401..03c4dc61 100644 --- a/doc/environment-variables/add.markdown +++ b/doc/environment-variables/add.markdown @@ -1,4 +1,4 @@ -# env add [value] +# env add <key> [value] Use this command to add an enviroment variable to an application. @@ -17,6 +17,6 @@ Examples: ## Options -### --application, --a,app, --a,app +### --application, --a,app, --a,app <application> application id \ No newline at end of file diff --git a/doc/environment-variables/list.markdown b/doc/environment-variables/list.markdown index 9a124a90..3e7c8405 100644 --- a/doc/environment-variables/list.markdown +++ b/doc/environment-variables/list.markdown @@ -14,7 +14,7 @@ Example: ## Options -### --application, --a,app, --a,app +### --application, --a,app, --a,app <application> application id diff --git a/doc/environment-variables/remove.markdown b/doc/environment-variables/remove.markdown index 3ab06f29..bc2d6e3d 100644 --- a/doc/environment-variables/remove.markdown +++ b/doc/environment-variables/remove.markdown @@ -1,4 +1,4 @@ -# env rm +# env rm <id> Use this command to remove an environment variable from an application. diff --git a/doc/environment-variables/rename.markdown b/doc/environment-variables/rename.markdown index 02efe476..5872b9d9 100644 --- a/doc/environment-variables/rename.markdown +++ b/doc/environment-variables/rename.markdown @@ -1,4 +1,4 @@ -# env rename +# env rename <id> <value> Use this command to rename an enviroment variable from an application. diff --git a/doc/examples/clone.markdown b/doc/examples/clone.markdown index e8c5fd3e..c32ab31d 100644 --- a/doc/examples/clone.markdown +++ b/doc/examples/clone.markdown @@ -1,4 +1,4 @@ -# example clone +# example clone <id> Use this command to clone an example application to the current directory diff --git a/doc/examples/info.markdown b/doc/examples/info.markdown index 794ac214..b01c88a5 100644 --- a/doc/examples/info.markdown +++ b/doc/examples/info.markdown @@ -1,4 +1,4 @@ -# example +# example <id> Use this command to show information of a single example application diff --git a/doc/keys/add.markdown b/doc/keys/add.markdown index 0280f500..ce8436ca 100644 --- a/doc/keys/add.markdown +++ b/doc/keys/add.markdown @@ -1,4 +1,4 @@ -# key add [path] +# key add <name> [path] Use this command to associate a new SSH key with your account. diff --git a/doc/keys/info.markdown b/doc/keys/info.markdown index acbfe1d9..20ade999 100644 --- a/doc/keys/info.markdown +++ b/doc/keys/info.markdown @@ -1,4 +1,4 @@ -# key +# key <id> Use this command to show information about a single SSH key. diff --git a/doc/keys/remove.markdown b/doc/keys/remove.markdown index 992465e1..a574a604 100644 --- a/doc/keys/remove.markdown +++ b/doc/keys/remove.markdown @@ -1,4 +1,4 @@ -# key rm +# key rm <id> Use this command to remove a SSH key from resin.io. diff --git a/doc/notes/set.markdown b/doc/notes/set.markdown index 5f58104f..bf6e3cef 100644 --- a/doc/notes/set.markdown +++ b/doc/notes/set.markdown @@ -1,4 +1,4 @@ -# note <|note> +# note <|note> Use this command to set or update a device note. @@ -13,6 +13,6 @@ Examples: ## Options -### --device, --d,dev, --d,dev +### --device, --d,dev, --d,dev <device> device id \ No newline at end of file diff --git a/doc/os/download.markdown b/doc/os/download.markdown index 23b97e16..d561b4aa 100644 --- a/doc/os/download.markdown +++ b/doc/os/download.markdown @@ -1,4 +1,4 @@ -# os download +# os download <id> Use this command to download the device OS configured to a specific network. @@ -22,18 +22,18 @@ Examples: ## Options -### --network, -n +### --network, -n <network> network type -### --ssid, -s +### --ssid, -s <ssid> wifi ssid, if network is wifi -### --key, -k +### --key, -k <key> wifi key, if network is wifi -### --output, -o +### --output, -o <output> output file \ No newline at end of file diff --git a/doc/os/install.markdown b/doc/os/install.markdown index ce227da0..1bb08ea1 100644 --- a/doc/os/install.markdown +++ b/doc/os/install.markdown @@ -1,4 +1,4 @@ -# os install [device] +# os install <image> [device] Use this command to write an operating system image to a device. diff --git a/doc/plugin/install.markdown b/doc/plugin/install.markdown index 619b0ee1..d9e8ebfb 100644 --- a/doc/plugin/install.markdown +++ b/doc/plugin/install.markdown @@ -1,4 +1,4 @@ -# plugin install +# plugin install <name> Use this command to install a resin plugin diff --git a/doc/plugin/remove.markdown b/doc/plugin/remove.markdown index 61675919..41028ea0 100644 --- a/doc/plugin/remove.markdown +++ b/doc/plugin/remove.markdown @@ -1,4 +1,4 @@ -# plugin rm +# plugin rm <name> Use this command to remove a resin.io plugin. diff --git a/doc/plugin/update.markdown b/doc/plugin/update.markdown index ba9d89d9..8d5aaac8 100644 --- a/doc/plugin/update.markdown +++ b/doc/plugin/update.markdown @@ -1,4 +1,4 @@ -# plugin update +# plugin update <name> Use this command to update a resin plugin diff --git a/extras/capitano-doc/markdown.coffee b/extras/capitano-doc/markdown.coffee index 1b724f94..9bcb72e4 100644 --- a/extras/capitano-doc/markdown.coffee +++ b/extras/capitano-doc/markdown.coffee @@ -1,4 +1,5 @@ _ = require('lodash') +ent = require('ent') utils = require('./utils') exports.option = (option) -> @@ -6,7 +7,7 @@ exports.option = (option) -> exports.command = (command) -> result = """ - # #{command.signature} + # #{ent.encode(command.signature)} #{command.help}\n """ diff --git a/extras/capitano-doc/utils.coffee b/extras/capitano-doc/utils.coffee index b0b9bd49..84eac0dc 100644 --- a/extras/capitano-doc/utils.coffee +++ b/extras/capitano-doc/utils.coffee @@ -1,4 +1,5 @@ _ = require('lodash') +ent = require('ent') exports.getOptionPrefix = (signature) -> if signature.length > 1 @@ -22,4 +23,4 @@ exports.parseSignature = (option) -> if option.parameter? result += " <#{option.parameter}>" - return result + return ent.encode(result) diff --git a/package.json b/package.json index 5ebab8db..b21e3a98 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ }, "devDependencies": { "chai": "~1.9.2", + "ent": "^2.2.0", "gulp": "~3.8.9", "gulp-coffee": "^2.2.0", "gulp-coffeelint": "~0.4.0",