1
.TH PYGETTEXT 1 "" "pygettext 1.4"
3
pygettext \- Python equivalent of xgettext(1)
6
[\fIOPTIONS\fR] \fIINPUTFILE \fR...
8
pygettext is deprecated. The current version of xgettext supports
9
many languages, including Python.
11
pygettext uses Python's standard tokenize module to scan Python
12
source code, generating .pot files identical to what GNU xgettext generates
13
for C and C++ code. From there, the standard GNU tools can be used.
15
pygettext searches only for _() by default, even though GNU xgettext
16
recognizes the following keywords: gettext, dgettext, dcgettext,
17
and gettext_noop. See the \fB\-k\fR/\fB\--keyword\fR flag below for how to
22
\fB\-a\fR, \fB\-\-extract\-all\fR
25
\fB\-d\fR, \fB\-\-default\-domain\fR=\fINAME\fR
26
Rename the default output file from messages.pot to name.pot.
28
\fB\-E\fR, \fB\-\-escape\fR
29
Replace non-ASCII characters with octal escape sequences.
31
\fB\-D\fR, \fB\-\-docstrings\fR
32
Extract module, class, method, and function docstrings.
33
These do not need to be wrapped in _() markers, and in fact cannot
34
be for Python to consider them docstrings. (See also the \fB\-X\fR option).
36
\fB\-h\fR, \fB\-\-help\fR
37
Print this help message and exit.
39
\fB\-k\fR, \fB\-\-keyword\fR=\fIWORD\fR
40
Keywords to look for in addition to the default set, which are: _
42
You can have multiple \fB\-k\fR flags on the command line.
44
\fB\-K\fR, \fB\-\-no\-default\-keywords\fR
45
Disable the default set of keywords (see above).
46
Any keywords explicitly added with the \fB\-k\fR/\fB\--keyword\fR option
49
\fB\-\-no\-location\fR
50
Do not write filename/lineno location comments.
52
\fB\-n\fR, \fB\-\-add\-location\fR
53
Write filename/lineno location comments indicating where each
54
extracted string is found in the source. These lines appear before
55
each msgid. The style of comments is controlled by the
56
\fB\-S\fR/\fB\--style\fR option. This is the default.
58
\fB\-o\fR, \fB\-\-output\fR=\fIFILENAME\fR
59
Rename the default output file from messages.pot to FILENAME.
60
If FILENAME is `-' then the output is sent to standard out.
62
\fB\-p\fR, \fB\-\-output\-dir\fR=\fIDIR\fR
63
Output files will be placed in directory DIR.
65
\fB\-S\fR, \fB\-\-style\fR=\fISTYLENAME\fR
66
Specify which style to use for location comments.
67
Two styles are supported:
70
Solaris # File: filename, line: line-number
75
The style name is case insensitive.
76
GNU style is the default.
78
\fB\-v\fR, \fB\-\-verbose\fR
79
Print the names of the files being processed.
81
\fB\-V\fR, \fB\-\-version\fR
82
Print the version of pygettext and exit.
84
\fB\-w\fR, \fB\-\-width\fR=\fICOLUMNS\fR
85
Set width of output to columns.
87
\fB\-x\fR, \fB\-\-exclude\-file\fR=\fIFILENAME\fR
88
Specify a file that contains a list of strings that are not be
89
extracted from the input files. Each string to be excluded must
90
appear on a line by itself in the file.
92
\fB\-X\fR, \fB\-\-no\-docstrings\fR=\fIFILENAME\fR
93
Specify a file that contains a list of files (one per line) that
94
should not have their docstrings extracted. This is only useful in
95
conjunction with the \fB\-D\fR option above.
97
If `INPUTFILE' is -, standard input is read.
99
pygettext attempts to be option and feature compatible with GNU xgettext
100
where ever possible. However some options are still missing or are not fully
101
implemented. Also, xgettext's use of command line switches with option
102
arguments is broken, and in these cases, pygettext just defines additional
105
pygettext is written by Barry Warsaw <barry@zope.com>.
107
Joonas Paalasmaa <joonas.paalasmaa@iki.fi> put this manual page together
108
based on "pygettext --help".