annotate doc/cmdline.txt @ 103:1ba215a5774d

Add wrapper class bundling the various formatting functions bound to a specific locale and time-zone.
author cmlenz
date Wed, 13 Jun 2007 08:26:23 +0000
parents f421e5576d26
children 6138ea7ef7a8
rev   line source
4
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
1 .. -*- mode: rst; encoding: utf-8 -*-
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
2
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
3 ======================
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
4 Command-Line Interface
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
5 ======================
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
6
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
7 Babel includes a command-line interface for working with message catalogs,
54
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
8 similar to the various GNU ``gettext`` tools commonly available on Linux/Unix
4
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
9 systems.
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
10
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
11
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
12 .. contents:: Contents
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
13 :depth: 2
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
14 .. sectnum::
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
15
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
16
54
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
17 When properly installed, Babel provides a script called ``babel``::
4
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
18
54
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
19 $ babel --help
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
20 usage: babel subcommand [options] [args]
4
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
21
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
22 options:
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
23 --version show program's version number and exit
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
24 -h, --help show this help message and exit
54
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
25
75
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
26 subcommands:
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
27 extract extract messages from source files and generate a POT file
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
28 init create new message catalogs from a template
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
29
54
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
30 The ``babel`` script provides a number of sub-commands that do the actual work.
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
31 Those sub-commands are described below.
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
32
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
33
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
34 extract
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
35 =======
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
36
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
37 The ``extract`` sub-command can be used to extract localizable messages from
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
38 a collection of source files::
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
39
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
40 $ babel extract --help
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
41 usage: babel extract [options] dir1 <dir2> ...
79
7cf16a49e8b2 Updated frontend screens for added sorting features.
cmlenz
parents: 75
diff changeset
42
7cf16a49e8b2 Updated frontend screens for added sorting features.
cmlenz
parents: 75
diff changeset
43 extract messages from source files and generate a POT file
7cf16a49e8b2 Updated frontend screens for added sorting features.
cmlenz
parents: 75
diff changeset
44
54
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
45 options:
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
46 -h, --help show this help message and exit
4
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
47 --charset=CHARSET charset to use in the output
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
48 -k KEYWORDS, --keyword=KEYWORDS
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
49 keywords to look for in addition to the defaults. You
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
50 can specify multiple -k flags on the command line.
54
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
51 --no-default-keywords
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
52 do not include the default keywords
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
53 -F MAPPING_FILE, --mapping=MAPPING_FILE
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
54 path to the extraction mapping file
4
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
55 --no-location do not include location comments with filename and
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
56 line number
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
57 --omit-header do not include msgid "" entry in header
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
58 -o OUTPUT, --output=OUTPUT
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
59 path to the output POT file
54
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
60 -w WIDTH, --width=WIDTH
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
61 set output line width (default 76)
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
62 --no-wrap do not break long message lines, longer than the
cc3c6cfe909d Support sub-commands in command-line interface, and renamed the generated script wrapper to `babel`. See #9.
cmlenz
parents: 4
diff changeset
63 output line width, into several lines
79
7cf16a49e8b2 Updated frontend screens for added sorting features.
cmlenz
parents: 75
diff changeset
64 --sort-output generate sorted output (default False)
7cf16a49e8b2 Updated frontend screens for added sorting features.
cmlenz
parents: 75
diff changeset
65 --sort-by-file sort output by file location (default False)
80
8e2e9d549693 Fixed the plurals header on `Catalog` which should only be written if it's not a catalog template.
palgarvio
parents: 79
diff changeset
66 --msgid-bugs-address=EMAIL@ADDRESS
8e2e9d549693 Fixed the plurals header on `Catalog` which should only be written if it's not a catalog template.
palgarvio
parents: 79
diff changeset
67 set report address for msgid
81
51f73a110a84 Implemented item 4 from #12. Set the copyright holder in the output.
palgarvio
parents: 80
diff changeset
68 --copyright-holder=COPYRIGHT_HOLDER
51f73a110a84 Implemented item 4 from #12. Set the copyright holder in the output.
palgarvio
parents: 80
diff changeset
69 set copyright holder in output
82
f421e5576d26 Added support for translator comments at the API and frontends levels.(See #12, item 1). Updated docs and tests accordingly.
palgarvio
parents: 81
diff changeset
70 -c TAG, --add-comments=TAG
f421e5576d26 Added support for translator comments at the API and frontends levels.(See #12, item 1). Updated docs and tests accordingly.
palgarvio
parents: 81
diff changeset
71 place comment block with TAG (or those preceding
f421e5576d26 Added support for translator comments at the API and frontends levels.(See #12, item 1). Updated docs and tests accordingly.
palgarvio
parents: 81
diff changeset
72 keyword lines) in output file. One TAG per argument
f421e5576d26 Added support for translator comments at the API and frontends levels.(See #12, item 1). Updated docs and tests accordingly.
palgarvio
parents: 81
diff changeset
73 call
75
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
74
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
75
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
76 init
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
77 ====
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
78
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
79 The `init` sub-command creates a new translations catalog based on a PO
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
80 template file::
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
81
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
82 $ babel init --help
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
83 usage: babel init [options]
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
84
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
85 create new message catalogs from a template
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
86
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
87 options:
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
88 -h, --help show this help message and exit
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
89 -D DOMAIN, --domain=DOMAIN
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
90 domain of PO file (defaults to lower-cased project
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
91 name)
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
92 -i INPUT_FILE, --input-file=INPUT_FILE
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
93 name of the input file
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
94 -d OUTPUT_DIR, --output-dir=OUTPUT_DIR
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
95 path to output directory
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
96 -o OUTPUT_FILE, --output-file=OUTPUT_FILE
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
97 name of the output file (default
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
98 '<output_dir>/<locale>/<domain>.po')
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
99 -l LOCALE, --locale=LOCALE
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
100 locale for the new localized catalog
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
101 --first-author=FIRST_AUTHOR_NAME
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
102 name of first author
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
103 --first-author-email=FIRST_AUTHOR_EMAIL
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
104 email of first author
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
105 --project-name=NAME the project name
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
106 --project-version=VERSION
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 54
diff changeset
107 the project version
Copyright (C) 2012-2017 Edgewall Software