rocdev-foundation / medera

Is a chat bot the new "Hello, World"?
GNU General Public License v3.0
1 stars 2 forks source link

Override formatting #29

Open geowa4 opened 7 years ago

geowa4 commented 7 years ago

Skills can optionally define their output's formatting. Sometimes, the output doesn't quite match what the original author intended or maybe it's just better viewed by a user in another format. To override the default formatting, the command's output is piped (a la Bash) to a formatting skill whose noun matches the available options in the skill definition. Assuming values to "format" as "pre", "json", and "table", the skills must be Format-Pre, Format-JSON, and Format-Table. As with all skills, case doesn't matter.

Assuming List-Skills defaults to JSON formatting, List-Skills | Format-Table will instead render the list of objects as a table. List-Skills | Format-JSON will be equivalent to the default. List-Skills | Format-Pre will print dense JSON.