From 313e059f367f2ac291cd409e77d22673f9595848 Mon Sep 17 00:00:00 2001 From: Qrius Date: Wed, 5 Mar 2025 08:41:05 +0100 Subject: First iteration of py skaldpress version --- smp.1 | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 smp.1 (limited to 'smp.1') diff --git a/smp.1 b/smp.1 new file mode 100644 index 0000000..1b616e4 --- /dev/null +++ b/smp.1 @@ -0,0 +1,105 @@ +.TH SMP 1 2024-06-08 +.SH name +Skaldpress Macro Processor \- Macro processor +.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. + + +.SS Macros +.IP "\fBinclude()\fR" +Includes a file in-place, performing macro-expansion on it. +NOTE, THERE IS NO LOOP PROTECTION HERE! + +.IP "\fBinclude_varbatim()\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. + +.IP "\fBdefine_array()\fR" +Defines a macro as a array, this can later be used with macros like \fBarray_push\fR and \fBarray_each\fR. + +.IP "\fBarray_push(, [, ])\fR" +On a macro that is defined as a array, this will add one or more elements. + +.IP "\fBarray_each(,