Pug-like Semantics
Let the text have a purpose
Just because we are "printing text" in a terminal window, it doesn't mean that it have no meaning or purpose. Using some Pug inspired syntax, we can structure the output:
When writing some content that will be displayed in the terminal just like a webpage would do via Lynx or w3m browser, it could be nice to have an idea of the puprose of each line.
In it's simplest form, a BashBox can even act like a terminal-based Blog.
Imagine a BashBox producing the script JoeBlog with a route Good news. Once installed, the command JoeBlog "Good news" would print the actual content / article. At each update, a new route can be added, and listed on the homepage (no arguments) so we could read it via JoeBlog "One more".
There are so far 8 tags, 8 text colors, 8 background colors and 4 font styles, plus some functions that we can mix toger to compose our output. See the reference section about functions and variables.
Custom styles via variables
In some custom library inside the SherpaCustomDir, we can go:
then import the styles and use them:
Basically, ${link} apply the formating, that last until the first ${x} that normalize back the output. You can also use directly txt/bg/fontStyles combinations but it's convenient to have repeating pattern loaded like "css classes".
This would work too, without importing custom styles: