cmlenz@4: .. -*- mode: rst; encoding: utf-8 -*- cmlenz@4: cmlenz@4: ====================== cmlenz@4: Command-Line Interface cmlenz@4: ====================== cmlenz@4: cmlenz@4: Babel includes a command-line interface for working with message catalogs, cmlenz@4: similar to the GNU ``xgettext`` program commonly available on Linux/Unix cmlenz@4: systems. cmlenz@4: cmlenz@4: cmlenz@4: .. contents:: Contents cmlenz@4: :depth: 2 cmlenz@4: .. sectnum:: cmlenz@4: cmlenz@4: cmlenz@4: pygettext cmlenz@4: ========= cmlenz@4: cmlenz@4: When properly installed, Babel provides a script called ``pygettext``, which can cmlenz@4: be used to extract localized messages from a variety of files:: cmlenz@4: cmlenz@4: $ pygettext --help cmlenz@4: usage: pygettext [options] dirname1 ... cmlenz@4: cmlenz@4: options: cmlenz@4: --version show program's version number and exit cmlenz@4: -h, --help show this help message and exit cmlenz@4: --charset=CHARSET charset to use in the output cmlenz@4: -k KEYWORDS, --keyword=KEYWORDS cmlenz@4: keywords to look for in addition to the defaults. You cmlenz@4: can specify multiple -k flags on the command line. cmlenz@4: --no-location do not include location comments with filename and cmlenz@4: line number cmlenz@4: --omit-header do not include msgid "" entry in header cmlenz@4: -o OUTPUT, --output=OUTPUT cmlenz@4: path to the output POT file