Created
August 27, 2018 18:29
-
-
Save hawkeye64/795907c0527fb5a98e9766eea98e4dd9 to your computer and use it in GitHub Desktop.
command-line-usage Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const commandLineUsage = require('command-line-usage') | |
const sections = [ | |
{ | |
header: 'classify', | |
content: 'Classifies an image using machine learning from passed in image path.' | |
}, | |
{ | |
header: 'Options', | |
optionList: [ | |
{ | |
name: 'image', | |
typeLabel: '{underline imagePath}', | |
description: '[required] The image path.' | |
}, | |
{ | |
name: 'confidence', | |
typeLabel: '{underline value}', | |
description: '[optional; default 50] The minimum confidence level to use for classification (ex: 50 for 50%).' | |
}, | |
{ | |
name: 'filter', | |
typeLabel: '{underline filterFile}', | |
description: '[optional] A filter file used to filter out classification not wanted.' | |
}, | |
{ | |
name: 'quick', | |
description: '[optional; default slow] Use quick classification, but may be more inaccurate.' | |
}, | |
{ | |
name: 'version', | |
description: 'Application version.' | |
}, | |
{ | |
name: 'help', | |
description: 'Print this usage guide.' | |
} | |
] | |
} | |
] | |
const usage = commandLineUsage(sections) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment