From 0db0021655f45ce9b1a8dc64e5ca3e1cfd7535e1 Mon Sep 17 00:00:00 2001 From: Qrius Date: Thu, 26 Sep 2024 00:11:05 +0200 Subject: Add some docs on macro processor --- smp.1 | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 smp.1 (limited to 'smp.1') diff --git a/smp.1 b/smp.1 new file mode 100644 index 0000000..d38e6fd --- /dev/null +++ b/smp.1 @@ -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()\fR" +Includes a file in-place, performing macro-expansion on it. +NOTE, THERE IS NO LOOP PROTECTION HERE! + +.IP "\fBinclude_verbatum()\fR" +Same as \fBinclude\fR, but does not expand macros. + +.IP "\fBdefine( [, ])\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(, [, ])\fR" + +.IP "\fBifndef(, [, ])\fR" + +.IP "\fBifeq(, , [, ])\fR" + +.IP "\fBifneq(, , [, ])\fR" + +.IP "\fBshell()\fR" +Runs command on shell, and includes the command output in the output + +.IP "\fBexpr(, , ..., )\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) -- cgit v1.2.3