1POD2TEXT(1) Perl Programmers Reference Guide POD2TEXT(1)
2
3
4
6 pod2text - Convert POD data to formatted ASCII text
7
9 pod2text [-aclost] [--code] [-i indent] [-q quotes] [-w width] [input
10 [output]]
11
12 pod2text -h
13
15 pod2text is a front-end for Pod::Text and its subclasses. It uses them
16 to generate formatted ASCII text from POD source. It can optionally
17 use either termcap sequences or ANSI color escape sequences to format
18 the text.
19
20 input is the file to read for POD source (the POD can be embedded in
21 code). If input isn't given, it defaults to STDIN. output, if given,
22 is the file to which to write the formatted output. If output isn't
23 given, the formatted output is written to STDOUT.
24
26 -a, --alt
27 Use an alternate output format that, among other things, uses a
28 different heading style and marks "=item" entries with a colon in
29 the left margin.
30
31 --code
32 Include any non-POD text from the input file in the output as well.
33 Useful for viewing code documented with POD blocks with the POD
34 rendered and the code left intact.
35
36 -c, --color
37 Format the output with ANSI color escape sequences. Using this
38 option requires that Term::ANSIColor be installed on your system.
39
40 -i indent, --indent=indent
41 Set the number of spaces to indent regular text, and the default
42 indentation for "=over" blocks. Defaults to 4 spaces if this
43 option isn't given.
44
45 -h, --help
46 Print out usage information and exit.
47
48 -l, --loose
49 Print a blank line after a "=head1" heading. Normally, no blank
50 line is printed after "=head1", although one is still printed after
51 "=head2", because this is the expected formatting for manual pages;
52 if you're formatting arbitrary text documents, using this option is
53 recommended.
54
55 -m width, --left-margin=width, --margin=width
56 The width of the left margin in spaces. Defaults to 0. This is
57 the margin for all text, including headings, not the amount by
58 which regular text is indented; for the latter, see -i option.
59
60 -o, --overstrike
61 Format the output with overstruck printing. Bold text is rendered
62 as character, backspace, character. Italics and file names are
63 rendered as underscore, backspace, character. Many pagers, such as
64 less, know how to convert this to bold or underlined text.
65
66 -q quotes, --quotes=quotes
67 Sets the quote marks used to surround C<> text to quotes. If
68 quotes is a single character, it is used as both the left and right
69 quote; if quotes is two characters, the first character is used as
70 the left quote and the second as the right quoted; and if quotes is
71 four characters, the first two are used as the left quote and the
72 second two as the right quote.
73
74 quotes may also be set to the special value "none", in which case
75 no quote marks are added around C<> text.
76
77 -s, --sentence
78 Assume each sentence ends with two spaces and try to preserve that
79 spacing. Without this option, all consecutive whitespace in non-
80 verbatim paragraphs is compressed into a single space.
81
82 -t, --termcap
83 Try to determine the width of the screen and the bold and underline
84 sequences for the terminal from termcap, and use that information
85 in formatting the output. Output will be wrapped at two columns
86 less than the width of your terminal device. Using this option
87 requires that your system have a termcap file somewhere where
88 Term::Cap can find it and requires that your system support
89 termios. With this option, the output of pod2text will contain
90 terminal control sequences for your current terminal type.
91
92 -w, --width=width, -width
93 The column at which to wrap text on the right-hand side. Defaults
94 to 76, unless -t is given, in which case it's two columns less than
95 the width of your terminal device.
96
98 If pod2text fails with errors, see Pod::Text and Pod::Parser for infor‐
99 mation about what those errors might mean. Internally, it can also
100 produce the following diagnostics:
101
102 -c (--color) requires Term::ANSIColor be installed
103 (F) -c or --color were given, but Term::ANSIColor could not be
104 loaded.
105
106 Unknown option: %s
107 (F) An unknown command line option was given.
108
109 In addition, other Getopt::Long error messages may result from invalid
110 command-line options.
111
113 COLUMNS
114 If -t is given, pod2text will take the current width of your screen
115 from this environment variable, if available. It overrides termi‐
116 nal width information in TERMCAP.
117
118 TERMCAP
119 If -t is given, pod2text will use the contents of this environment
120 variable if available to determine the correct formatting sequences
121 for your current terminal device.
122
124 Pod::Text, Pod::Text::Color, Pod::Text::Overstrike, Pod::Text::Termcap,
125 Pod::Parser
126
127 The current version of this script is always available from its web
128 site at <http://www.eyrie.org/~eagle/software/podlators/>. It is also
129 part of the Perl core distribution as of 5.6.0.
130
132 Russ Allbery <rra@stanford.edu>.
133
135 Copyright 1999, 2000, 2001 by Russ Allbery <rra@stanford.edu>.
136
137 This program is free software; you may redistribute it and/or modify it
138 under the same terms as Perl itself.
139
140
141
142perl v5.8.8 2008-05-05 POD2TEXT(1)