aboutsummaryrefslogtreecommitdiff
path: root/gsp.1
blob: 82bb9f4575953bca40746c5d8c4387f54c12f72b (plain) (blame)
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
49
50
51
52
53
54
55
56
57
58
59
.Dd $Mdocdate: September 10 2023 $
.Dt GSP 1
.Os
.Sh NAME
.Nm gsp
.Nd better syntax for HTML and XML
.Sh SYNOPSIS
.Nm
.Op Fl x
.Op Ar
.Sh DESCRIPTION
.Nm
is a utility to transpile
.Xr gsp 5
formatted plain\-text files into valid HTML and XML.
Files provided as command\-line arguments will be transpiled with the result
being written to the standard output.
If no arguments or the special filename
.Pa -
is provided, then input will be read from the standard input.
.Pp
By default files are transpiled to HTML, where tags with no children take the
form of
.Ql <tag>
as opposed to XML where they take the form of
.Ql <tag/> .
If the document begins with an XML document type or the
.Fl x
flag is specified, then
.Nm
will transpile to XML.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl x
Transpile to XML instead of HTML.
.El
.Sh EXIT STATUS
.Ex -std gsp
.Sh EXAMPLES
Compile the files
.Pa head.gsp
and
.Pa tail.gsp
into one HTML document:
.Pp
.Dl $ gsp head.gsp tail.gsp >out.html
.Pp
Expand
.Xr m4 1
macros before transpiling:
.Pp
.Dl $ m4 foo.gsp | gsp
.Sh SEE ALSO
.Xr m4 1 ,
.Xr sed 1 ,
.Xr gsp 5
.Sh AUTHORS
.An Thomas Voss Aq Mt mail@thomasvoss.com