1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
.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.
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.
.IP "\fBformat_time(<format>, <time>)\fR"
Format a RFC3339-timestamp to the specified format. Format is similar to strftime.
Only available if the \fBtime\fR-feature was enabled during compilation.
.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)
|