4
|
1 .. -*- mode: rst; encoding: utf-8 -*-
|
|
2
|
|
3 ======================
|
|
4 Command-Line Interface
|
|
5 ======================
|
|
6
|
|
7 Babel includes a command-line interface for working with message catalogs,
|
|
8 similar to the GNU ``xgettext`` program commonly available on Linux/Unix
|
|
9 systems.
|
|
10
|
|
11
|
|
12 .. contents:: Contents
|
|
13 :depth: 2
|
|
14 .. sectnum::
|
|
15
|
|
16
|
|
17 pygettext
|
|
18 =========
|
|
19
|
|
20 When properly installed, Babel provides a script called ``pygettext``, which can
|
|
21 be used to extract localized messages from a variety of files::
|
|
22
|
|
23 $ pygettext --help
|
|
24 usage: pygettext [options] dirname1 <dirname2> ...
|
|
25
|
|
26 options:
|
|
27 --version show program's version number and exit
|
|
28 -h, --help show this help message and exit
|
|
29 --charset=CHARSET charset to use in the output
|
|
30 -k KEYWORDS, --keyword=KEYWORDS
|
|
31 keywords to look for in addition to the defaults. You
|
|
32 can specify multiple -k flags on the command line.
|
|
33 --no-location do not include location comments with filename and
|
|
34 line number
|
|
35 --omit-header do not include msgid "" entry in header
|
|
36 -o OUTPUT, --output=OUTPUT
|
|
37 path to the output POT file
|