1252995Sdteske# Copyright (c) 2012-2013 Devin Teske
2252995Sdteske# All rights reserved.
3252995Sdteske#
4252995Sdteske# Redistribution and use in source and binary forms, with or without
5252995Sdteske# modification, are permitted provided that the following conditions
6252995Sdteske# are met:
7252995Sdteske# 1. Redistributions of source code must retain the above copyright
8252995Sdteske#    notice, this list of conditions and the following disclaimer.
9252995Sdteske# 2. Redistributions in binary form must reproduce the above copyright
10252995Sdteske#    notice, this list of conditions and the following disclaimer in the
11252995Sdteske#    documentation and/or other materials provided with the distribution.
12252995Sdteske#
13252995Sdteske# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14252995Sdteske# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15252995Sdteske# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16252995Sdteske# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17252995Sdteske# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18252995Sdteske# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19252995Sdteske# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20252995Sdteske# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21252995Sdteske# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22252995Sdteske# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23252995Sdteske# SUCH DAMAGE.
24252995Sdteske#
25252995Sdteske# $FreeBSD$
26252995Sdteske
27252995SdteskeUsage: bsdconfig @PROGRAM_NAME@ [OPTIONS]
28252995Sdteske
29252995SdteskeOPTIONS:
30252995Sdteske	-h    Print this usage statement and exit.
31252995Sdteske	-c    Don't show command-line shortcut relationships.
32252995Sdteske	-d    Don't show the date in the graph label.
33252995Sdteske	-i    Don't show include relationships.
34252995Sdteske
35252995SdteskeEXAMPLES:
36252995Sdteske	View dot(1) language output describing bsdconfig(8) layout/make-up:
37252995Sdteske
38252995Sdteske		bsdconfig @PROGRAM_NAME@ | less
39252995Sdteske
40252995Sdteske	Render dot(1) output in SVG format (displays in most modern browsers):
41252995Sdteske
42252995Sdteske		bsdconfig @PROGRAM_NAME@ | dot -Tsvg -o bsdconfig.svg
43252995Sdteske
44252995Sdteske		NOTE: Requires `graphics/graphviz' from ports/packages.
45252995Sdteske
46252995Sdteske	View the above-rendered SVG file using your favorite X11-based viewer:
47252995Sdteske
48252995Sdteske		gimmage bsdconfig.svg
49252995Sdteske
50252995Sdteske			NOTE: Requires `graphics/gimmage' from ports/packages.
51252995Sdteske
52252995Sdteske		or
53252995Sdteske
54252995Sdteske		gthumb bsdconfig.svg
55252995Sdteske
56252995Sdteske			NOTE: Image is scaled to fit window on launch.
57252995Sdteske			NOTE: Requires `graphics/gthumb' from ports/packages.
58252995Sdteske
59252995Sdteske		or
60252995Sdteske
61252995Sdteske		gqview bsdconfig.svg
62252995Sdteske
63252995Sdteske			NOTE: Requires `graphics/gqview' from ports/packages.
64252995Sdteske
65252995Sdteske		or
66252995Sdteske
67252995Sdteske		gx bsdconfig.svg
68252995Sdteske
69252995Sdteske			NOTE: Image is scaled to fit window on launch.
70252995Sdteske			NOTE: Requires `graphics/gx' from ports/packages.
71252995Sdteske
72252995Sdteske		or
73252995Sdteske
74252995Sdteske		eog bsdconfig.svg
75252995Sdteske
76252995Sdteske			NOTE: Requires `graphics/eog' from ports/packages.
77252995Sdteske
78252995Sdteske	Render dot(1) output as PostScript print output consisting of multiple
79252995Sdteske	US-Letter sized pages that can be assembled into a large poster (using
80252995Sdteske	traditional tools such as scissors and tape):
81252995Sdteske
82252995Sdteske		bsdconfig @PROGRAM_NAME@ | dot -Teps -o bsdconfig.eps
83252995Sdteske		poster -v -mLet -s1 -o bsdconfig.ps bsdconfig.eps
84252995Sdteske
85252995Sdteske		NOTE: Change "-s1" above to "-s0.5" to halve the size of the
86252995Sdteske		      poster or "-s2", for example, to double the poster size.
87252995Sdteske
88252995Sdteske		NOTE: Requires both `graphics/graphviz' and `print/poster' from
89252995Sdteske		      ports/packages.
90252995Sdteske
91252995Sdteske	Render dot(1) output as PostScript scaled to fit on a poster consisting
92252995Sdteske	of 2x-wide and 4x-tall US-Letter sized pages:
93252995Sdteske
94252995Sdteske		bsdconfig @PROGRAM_NAME@ | dot -Teps -o bsdconfig.eps
95252995Sdteske		poster -v -mLet -p2x4Letter -o bsdconfig.ps bsdconfig.eps
96252995Sdteske
97252995Sdteske		NOTE: Requires both `graphics/graphviz' and `print/poster' from
98252995Sdteske		      ports/packages.
99252995Sdteske
100252995Sdteske	View the above-rendered PostScript poster using X11:
101252995Sdteske
102252995Sdteske		gsview bsdconfig.ps
103252995Sdteske
104252995Sdteske			NOTE: Requires `print/gsview' from ports/packages.
105252995Sdteske
106252995Sdteske		or
107252995Sdteske
108252995Sdteske		convert bsdconfig.ps bsdconfig.pdf
109252995Sdteske		xpdf bsdconfig.pdf
110252995Sdteske
111252995Sdteske			NOTE: Requires both `graphics/ImageMagick' and
112252995Sdteske			      `graphics/xdpf' from ports/packages.
113252995Sdteske
114252995Sdteske			NOTE: The converted PDF file is not suitable for
115252995Sdteske			      printing due to loss of quality during the
116252995Sdteske			      conversion process.
117252995Sdteske
118252995Sdteske	Print the above-rendered PostScript poster:
119252995Sdteske
120252995Sdteske		lpr -h bsdconfig.ps
121252995Sdteske
122252995Sdteske		NOTE: Requires configuration of a printer in `/etc/printcap'.
123252995Sdteske
124252995Sdteske	Extract each page of the poster into a separate PNG file:
125252995Sdteske
126252995Sdteske		gs -q -dNOPAUSE -dBATCH -sPAPERSIZE=letter \
127252995Sdteske		   -dTextAlphaBits=4 -dGraphicsAlphaBits=4 \
128252995Sdteske		   -sDEVICE=png16m -sOutputFile=bsdconfig%03d.png \
129252995Sdteske		   bsdconfig.ps
130252995Sdteske
131252995Sdteske		NOTE: Requires `print/ghostscript9' from ports/packages.
132252995Sdteske
133252995Sdteske		NOTE: The converted PNG files are not suitable for printing
134252995Sdteske		      due to loss of quality during the conversion process.
135252995Sdteske
136252995Sdteske	Extract a single page of the poster into a separate PostScript file for
137252995Sdteske	printing individual pages from the command-line:
138252995Sdteske
139252995Sdteske		psselect 1 bsdconfig.ps bsdconfig-page1.ps
140252995Sdteske		lpr -h bsdconfig-page1.ps
141252995Sdteske
142252995Sdteske		NOTE: Change "1" to "2" for the second page, ad-infinitum.
143252995Sdteske		NOTE: Requires `print/psutils-letter' from ports/packages.
144