pygmentize.1 3.4 KB

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