1PYGMENTIZE(1) General Commands Manual PYGMENTIZE(1)
2
3
4
6 pygmentize - highlights the input file
7
8
10 pygmentize [-l <lexer>] [-F <filter>[:<options>]] [-f <formatter>]
11 [-O <options>] [-P <option=value>] [-o <outfile>] [<infile>]
12 pygmentize -S <style> -f <formatā
13 ter> [-a <arg>] [-O <options>] [-P <option=value>]
14 pygmentize -L [<which> ...]
15 pygmentize -H <type> <name>
16 pygmentize -h | -V
17
18
20 Pygments is a generic syntax highlighter for general use in all kinds
21 of software such as forum systems, wikis or other applications that
22 need to prettify source code.
23
24 Its highlights are:
25 * a wide range of common languages and markup formats is supported
26 * special attention is paid to details, increasing quality by a fair
27 amount
28 * support for new languages and formats are added easily
29 * a number of output formats, presently HTML, LaTeX and ANSI
30 sequences
31 * it is usable as a command-line tool and as a library
32 * ... and it highlights even Brainfuck!
33
34 pygmentize is a command that uses Pygments to highlight the input file
35 and write the result to <outfile>. If no <infile> is given, stdin is
36 used.
37
39 A summary of options is included below.
40
41 -l <lexer>
42 Set the lexer name. If not given, the lexer is guessed from the
43 extension of the input file name (this obviously doesn't work if
44 the input is stdin).
45
46 -F <filter>[:<options>]
47 Add a filter to the token stream. You can give options in the
48 same way as for -O after a colon (note: there must not be spaces
49 around the colon). This option can be given multiple times.
50
51 -f <formatter>
52 Set the formatter name. If not given, it will be guessed from
53 the extension of the output file name. If no output file is
54 given, the terminal formatter will be used by default.
55
56 -o <outfile>
57 Set output file. If not given, stdout is used.
58
59 -O <options>
60 With this option, you can give the lexer and formatter a comma-
61 separated list of options, e.g. "-O bg=light,python=cool". Which
62 options are valid for which lexers and formatters can be found
63 in the documentation. This option can be given multiple times.
64
65 -P <option=value>
66 This option adds lexer and formatter options like the -O option,
67 but you can only give one option per -P. That way, the option
68 value may contain commas and equals signs, which it can't with
69 -O.
70
71 -S <style>
72 Print out style definitions for style <style> and for formatter
73 <formatter>. The meaning of the argument given by -a <arg> is
74 formatter dependent and can be found in the documentation.
75
76 -L [<which> ...]
77 List lexers, formatters, styles or filters. Set <which> to the
78 thing you want to list (e.g. "styles"), or omit it to list
79 everything.
80
81 -H <type> <name>
82 Print detailed help for the object <name> of type <type>, where
83 <type> is one of "lexer", "formatter" or "filter".
84
85 -h Show help screen.
86
87 -V Show version of the Pygments package.
88
90 /usr/share/doc/python-pygments/index.html
91
93 pygmentize was written by Georg Brandl <g.brandl@gmx.net>.
94
95 This manual page was written by Piotr Ozarowski <ozarow@gmail.com>, for
96 the Debian project (but may be used by others).
97
98
99
100 February 15, 2007 PYGMENTIZE(1)