Plugin for Robo.
The MC greets you and tells you what's up. They do it with flair, and they make you feel glad you're here.
MC is a collection of next-generation output styles and interactions for your command line.
Checks your task stack and lets you know whether it succeeded.
Usage: check_success($result, $string)
$result = the task stack result object
$string = human description to be repeated back to the user
Check if an app exists. If it doesn't, replace with echo
.
Usage: check_app($name)
Tell the user how long your script took to complete. Use time()
to get the start time when you start, and pass it to stopwatch()
when your script ends.
Usage: stopwatch($start_time)
The Master of Ceremonies' crown jewel: Catlet! It's a combination of lolcat
and figlet
. Renders your string as a colorful title banner. Example:
_ _ _ _ __ __ _ _
| | | | ___| | | ___ \ \ / /__ _ __| | __| |
| |_| |/ _ \ | |/ _ \ \ \ /\ / / _ \| '__| |/ _` |
| _ | __/ | | (_) | \ V V / (_) | | | | (_| |
|_| |_|\___|_|_|\___/ \_/\_/ \___/|_| |_|\__,_|
But, like, with color. It's awesome, man.
Usage: catlet($string)
The MC's grand introduction. Includes banner, welcome message, list of steps, and confirmation prompt.
Usage: intro($banner, $message, $list)
$banner = short intro title
$message = plain text welcome message under the banner
$list = list of steps that your script will perform
Output text in color. Great for emphasizing something in a block of plain text. This is a php wrapper for the tput
command line tool.
Colors:
- black
- red
- green
- yellow
- blue
- magenta
- cyan
- white
Usage: tput($string, $color)
Add tutorial creating & using plugins:
- Rewrite what's currently there, but with:
- reorder
- more formatting (headers, &c.)
- change tone (less technical, active voice)
- links to other things
- demo code snippets: composer.json
- point to example file
- second page: how to USE plugins (stub for now?)
Brought to you by Jordan Koplowicz.
With gratitude to Greg Andersen.
This software is free to use, modify, and distribute under the GPL 3 license.