Current File : //usr/share/doc/python-babel-0.9.6/doc/api/babel.messages.frontend.CommandLineInterface-class.html |
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>babel.messages.frontend.CommandLineInterface</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th> <a
href="babel-module.html">Home</a> </th>
<!-- Tree link -->
<th> <a
href="module-tree.html">Trees</a> </th>
<!-- Index link -->
<th> <a
href="identifier-index.html">Indices</a> </th>
<!-- Help link -->
<th> <a
href="help.html">Help</a> </th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="../index.html">Documentation Index</a></th>
</tr></table></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="babel-module.html">Package babel</a> ::
<a href="babel.messages-module.html">Package messages</a> ::
<a href="babel.messages.frontend-module.html">Module frontend</a> ::
Class CommandLineInterface
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class CommandLineInterface</h1><p class="nomargin-top"></p>
<pre class="base-tree">
object --+
|
<strong class="uidshort">CommandLineInterface</strong>
</pre>
<hr />
<p>Command-line interface.</p>
<p>This class provides a simple command-line interface to the message
extraction and PO file generation functionality.</p>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td align="left" colspan="2" class="table-header">
<span class="table-header">Instance Methods</span></td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="babel.messages.frontend.CommandLineInterface-class.html#run" class="summary-sig-name">run</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">argv</span>=<span class="summary-sig-default"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">(imported)</code><code class="variable-quote">'</code><code class="variable-group">]</code></span>)</span><br />
Main entry point of the command-line interface.</td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="babel.messages.frontend.CommandLineInterface-class.html#compile" class="summary-sig-name">compile</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">argv</span>)</span><br />
Subcommand for compiling a message catalog to a MO file.</td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="babel.messages.frontend.CommandLineInterface-class.html#extract" class="summary-sig-name">extract</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">argv</span>)</span><br />
Subcommand for extracting messages from source files and generating
a POT file.</td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="babel.messages.frontend.CommandLineInterface-class.html#init" class="summary-sig-name">init</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">argv</span>)</span><br />
Subcommand for creating new message catalogs from a template.</td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="babel.messages.frontend.CommandLineInterface-class.html#update" class="summary-sig-name">update</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">argv</span>)</span><br />
Subcommand for updating existing message catalogs from a template.</td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__format__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__init__</code>,
<code>__new__</code>,
<code>__reduce__</code>,
<code>__reduce_ex__</code>,
<code>__repr__</code>,
<code>__setattr__</code>,
<code>__sizeof__</code>,
<code>__str__</code>,
<code>__subclasshook__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td align="left" colspan="2" class="table-header">
<span class="table-header">Class Variables</span></td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="usage"></a><span class="summary-name">usage</span> = <code title="'%%prog %s [options] %s'"><code class="variable-quote">'</code><code class="variable-string">%%prog %s [options] %s</code><code class="variable-quote">'</code></code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="version"></a><span class="summary-name">version</span> = <code title="'%prog 0.9.5'"><code class="variable-quote">'</code><code class="variable-string">%prog 0.9.5</code><code class="variable-quote">'</code></code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="babel.messages.frontend.CommandLineInterface-class.html#commands" class="summary-name">commands</a> = <code title="{'compile': 'compile message catalogs to MO files',
'extract': 'extract messages from source files and generate a POT fil\
e',
'init': 'create new message catalogs from a POT file',
'update': 'update existing message catalogs from a POT file'}"><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">compile</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">compile message catalogs to MO files</code><code class="variable-quote">'</code><code class="variable-op">,</code><code class="variable-ellipsis">...</code></code>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td align="left" colspan="2" class="table-header">
<span class="table-header">Properties</span></td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td align="left" colspan="2" class="table-header">
<span class="table-header">Method Details</span></td>
</tr>
</table>
<a name="run"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">run</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">argv</span>=<span class="sig-default"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">(imported)</code><code class="variable-quote">'</code><code class="variable-group">]</code></span>)</span>
</h3>
</td><td align="right" valign="top"
>
</td>
</tr></table>
Main entry point of the command-line interface.
<dl class="fields">
<dt>Parameters:</dt>
<dd><ul class="nomargin-top">
<li><strong class="pname"><code>argv</code></strong> - list of arguments passed on the command-line</li>
</ul></dd>
</dl>
</td></tr></table>
</div>
<a name="compile"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">compile</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">argv</span>)</span>
</h3>
</td><td align="right" valign="top"
>
</td>
</tr></table>
Subcommand for compiling a message catalog to a MO file.
<dl class="fields">
<dt>Parameters:</dt>
<dd><ul class="nomargin-top">
<li><strong class="pname"><code>argv</code></strong> - the command arguments</li>
</ul></dd>
</dl>
<div class="fields"> <p><strong>Since:</strong>
version 0.9
</p>
</div></td></tr></table>
</div>
<a name="extract"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">extract</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">argv</span>)</span>
</h3>
</td><td align="right" valign="top"
>
</td>
</tr></table>
Subcommand for extracting messages from source files and generating
a POT file.
<dl class="fields">
<dt>Parameters:</dt>
<dd><ul class="nomargin-top">
<li><strong class="pname"><code>argv</code></strong> - the command arguments</li>
</ul></dd>
</dl>
</td></tr></table>
</div>
<a name="init"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">init</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">argv</span>)</span>
</h3>
</td><td align="right" valign="top"
>
</td>
</tr></table>
Subcommand for creating new message catalogs from a template.
<dl class="fields">
<dt>Parameters:</dt>
<dd><ul class="nomargin-top">
<li><strong class="pname"><code>argv</code></strong> - the command arguments</li>
</ul></dd>
</dl>
</td></tr></table>
</div>
<a name="update"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">update</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">argv</span>)</span>
</h3>
</td><td align="right" valign="top"
>
</td>
</tr></table>
Subcommand for updating existing message catalogs from a template.
<dl class="fields">
<dt>Parameters:</dt>
<dd><ul class="nomargin-top">
<li><strong class="pname"><code>argv</code></strong> - the command arguments</li>
</ul></dd>
</dl>
<div class="fields"> <p><strong>Since:</strong>
version 0.9
</p>
</div></td></tr></table>
</div>
<br />
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
<a name="section-ClassVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td align="left" colspan="2" class="table-header">
<span class="table-header">Class Variable Details</span></td>
</tr>
</table>
<a name="commands"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">commands</h3>
<dl class="fields">
</dl>
<dl class="fields">
<dt>Value:</dt>
<dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">compile</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">compile message catalogs to MO files</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-quote">'</code><code class="variable-string">extract</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">extract messages from source files and generate a POT fil</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="variable-string">e</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-quote">'</code><code class="variable-string">init</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">create new message catalogs from a POT file</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-quote">'</code><code class="variable-string">update</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">update existing message catalogs from a POT file</code><code class="variable-quote">'</code><code class="variable-group">}</code>
</pre></td></tr></table>
</dd>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th> <a
href="babel-module.html">Home</a> </th>
<!-- Tree link -->
<th> <a
href="module-tree.html">Trees</a> </th>
<!-- Index link -->
<th> <a
href="identifier-index.html">Indices</a> </th>
<!-- Help link -->
<th> <a
href="help.html">Help</a> </th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="../index.html">Documentation Index</a></th>
</tr></table></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Thu Mar 17 15:12:44 2011
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>