xref: /freebsd/contrib/libxo/xohtml/xohtml.1 (revision 264104f26834fdb27974e0c5fdedf8f2f5a90383)
1.\" #
2.\" # Copyright (c) 2015, Juniper Networks, Inc.
3.\" # All rights reserved.
4.\" # This SOFTWARE is licensed under the LICENSE provided in the
5.\" # ../Copyright file. By downloading, installing, copying, or
6.\" # using the SOFTWARE, you agree to be bound by the terms of that
7.\" # LICENSE.
8.\" # Phil Shafer, July 2014
9.\"
10.Dd December 4, 2014
11.Dt XOHTML 1
12.Os
13.Sh NAME
14.Nm xohtml
15.Nd display libxo html output
16.Xr xo_emit 3
17.Sh SYNOPSIS
18.Nm xohtml
19.Op Fl "b <base>"
20.Op Fl "c" <command>"
21.Op Fl "f" <output>
22.Op Ar command argument...
23.Sh DESCRIPTION
24.Nm
25is a tool for preparing
26.Xr libxo 3
27HTML output for display in modern HTML web browsers.
28.Nm
29can operate in two modes.
30If command is provided
31either with the
32.Fl c
33option or as argument(s) to the
34.Nm
35command, that command is executed and the resulting output is processed.
36If no command is given, the
37standard input is used.
38.Pp
39.Nm
40is typically used to wrap
41.Nm libxo
42output with sufficient HTML content to allow display in a web browser.
43This includes parent HTML tags as well as
44.Nm CSS
45stylesheets and
46.Nm Javascript
47files.
48.Pp
49If the command is given directly on the command line,
50.Nm
51will add the "--libxo=html" option needed to generate HTML output
52from
53.Nm libxo "-enabled"
54applications.  See
55.Xr xo_options 7
56for details.
57.Pp
58The following options are available:
59.Bl -tag -width indent
60.It Ic -b Ar base | Ic --base Ar base
61Supplies a source path for the CSS and Javascript files referenced in
62the output of
63.Nm xohtml .
64.It Ic -c Ar command | Ic --command Ar command
65Use the given command instead of one on the command line.
66This command should be quoted if it consists of multiple tokens, and
67should contain the "--libxo=html" option or equivalent, since the
68command is used directly.
69.It Ic -f Ar file | Ic --file Ar file
70Output is saved to the given file, rather than to the standard output
71descriptor.
72.El
73.Pp
74.Sh EXAMPLES
75The following command line will run "du --libxo=html ~/src" and save
76the output to /tmp/src.html:
77.Bd -literal -offset indent
78    xohtml du ~/src > /tmp/src.html
79.Ed
80.Pp
81The following command line will run "du --libxo=html,warn ~/src" and save
82the output to /tmp/src.html:
83.Bd -literal -offset indent
84    du --libxo=html,warn ~/src | xohtml -f /tmp/src.html
85.Ed
86.Pp
87The following command line will run "du --libxo=html,warn ~/src" and save
88the output to /tmp/src.html:
89.Bd -literal -offset indent
90    xohtml -c "du --libxo=html,warn ~/src" -f /tmp/src.html
91.Ed
92.Pp
93.Sh SEE ALSO
94.Xr libxo 3 ,
95.Xr xo_emit 3 ,
96.Xr xo_options 7
97