comparison doc/cmdline.txt @ 52:1e724c305460

Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
author cmlenz
date Thu, 07 Jun 2007 22:59:25 +0000
parents b2492365f186
children dd5c3ba59eae
comparison
equal deleted inserted replaced
51:7f61453c1bea 52:1e724c305460
3 ====================== 3 ======================
4 Command-Line Interface 4 Command-Line Interface
5 ====================== 5 ======================
6 6
7 Babel includes a command-line interface for working with message catalogs, 7 Babel includes a command-line interface for working with message catalogs,
8 similar to the GNU ``xgettext`` program commonly available on Linux/Unix 8 similar to the various GNU ``gettext`` tools commonly available on Linux/Unix
9 systems. 9 systems.
10 10
11 11
12 .. contents:: Contents 12 .. contents:: Contents
13 :depth: 2 13 :depth: 2
14 .. sectnum:: 14 .. sectnum::
15 15
16 16
17 pygettext 17 When properly installed, Babel provides a script called ``babel``::
18 =========
19 18
20 When properly installed, Babel provides a script called ``pygettext``, which can 19 $ babel --help
21 be used to extract localized messages from a variety of files:: 20 usage: babel subcommand [options] [args]
22
23 $ pygettext --help
24 usage: pygettext [options] dirname1 <dirname2> ...
25 21
26 options: 22 options:
27 --version show program's version number and exit 23 --version show program's version number and exit
24 -h, --help show this help message and exit
25
26 The ``babel`` script provides a number of sub-commands that do the actual work.
27 Those sub-commands are described below.
28
29
30 extract
31 =======
32
33 The ``extract`` sub-command can be used to extract localizable messages from
34 a collection of source files::
35
36 $ babel extract --help
37 usage: babel extract [options] dir1 <dir2> ...
38
39 options:
28 -h, --help show this help message and exit 40 -h, --help show this help message and exit
29 --charset=CHARSET charset to use in the output 41 --charset=CHARSET charset to use in the output
30 -k KEYWORDS, --keyword=KEYWORDS 42 -k KEYWORDS, --keyword=KEYWORDS
31 keywords to look for in addition to the defaults. You 43 keywords to look for in addition to the defaults. You
32 can specify multiple -k flags on the command line. 44 can specify multiple -k flags on the command line.
45 --no-default-keywords
46 do not include the default keywords
47 -F MAPPING_FILE, --mapping=MAPPING_FILE
48 path to the extraction mapping file
33 --no-location do not include location comments with filename and 49 --no-location do not include location comments with filename and
34 line number 50 line number
35 --omit-header do not include msgid "" entry in header 51 --omit-header do not include msgid "" entry in header
36 -o OUTPUT, --output=OUTPUT 52 -o OUTPUT, --output=OUTPUT
37 path to the output POT file 53 path to the output POT file
54 -w WIDTH, --width=WIDTH
55 set output line width (default 76)
56 --no-wrap do not break long message lines, longer than the
57 output line width, into several lines
Copyright (C) 2012-2017 Edgewall Software