diff options
-rw-r--r-- | smp.1 | 44 |
1 files changed, 44 insertions, 0 deletions
@@ -0,0 +1,44 @@ +.TH SMP 1 2024-06-08 +.SH name +Skaldpress Macro Processor \- Text graphing utility +.SH SYNOPSIS +.B smp [\fIinput_file\fB] + +.SH DESCRIPTION +.B smp +smp is a macro processor, made specifically for a usecase when doing templating of websites. + + +Macros +.IP "\fBinclude(<file>)\fR" +Includes a file in-place, performing macro-expansion on it. +NOTE, THERE IS NO LOOP PROTECTION HERE! + +.IP "\fBinclude_verbatum(<file>)\fR" +Same as \fBinclude\fR, but does not expand macros. + +.IP "\fBdefine(<macro_name> [, <macro content>])\fR" +This defines a macro, optionally with some content. +The optional content will be expanded immediately, +and later the already processed content will be included in the output. + +.IP "\fBifdef(<macro_name>, <output if defined> [, <output if not defined>])\fR" + +.IP "\fBifndef(<macro_name>, <output if not defined> [, <output if defined>])\fR" + +.IP "\fBifeq(<arg1>, <arg2>, <output if equal> [, <output if not equal>])\fR" + +.IP "\fBifneq(<arg1>, <arg2>, <output if not equal> [, <output if equal>])\fR" + +.IP "\fBshell(<command>)\fR" +Runs command on shell, and includes the command output in the output + +.IP "\fBexpr(<arg1>, <arg2>, ..., <argN>)\fR" +Shorthand for running the expr command, expands all arguments, and executes it on the shell. + +.SH OPTIONS +If a input file is provided, that will be processed. +If not, a sort of interactive REPL will be started instead. + +.SH SEE ALSO +skaldpress(1) |