juggle - a tiny language designed for text documents
Juggle's syntax is designed to be minimally invasive, simply by taking up only 1 line and a small amount of space. Juggle works by looking for two-character actions at the start of a line. These actions are:
#@ - denotes a global command
#? - denotes a boolean
## - denotes a comment (will be removed from final output)
#! - denotes a bang, a command which modifies the next line
For example, here's a text file using Juggle:
#?Unavailable
#!Upper
Lorem ipsum...
We call parse(input, options) on this with an input object as so:
{
"upper": function(line) {
return line.toUpperCase()
}
}
Parsing would then return an object with the following structure:
{
"result": "\nLOREM IPSUM...",
"bools": {
"unavailable": true
}
}