diff options
Diffstat (limited to 'translate-toolkit-1.3.0/translate/doc/user/toolkit-csv2tbx.html')
-rw-r--r-- | translate-toolkit-1.3.0/translate/doc/user/toolkit-csv2tbx.html | 177 |
1 files changed, 177 insertions, 0 deletions
diff --git a/translate-toolkit-1.3.0/translate/doc/user/toolkit-csv2tbx.html b/translate-toolkit-1.3.0/translate/doc/user/toolkit-csv2tbx.html new file mode 100644 index 0000000..dffb3fa --- /dev/null +++ b/translate-toolkit-1.3.0/translate/doc/user/toolkit-csv2tbx.html @@ -0,0 +1,177 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> +<head> + <title></title> + <link rel="stylesheet" media="screen" type="text/css" href="./style.css" /> + <link rel="stylesheet" media="screen" type="text/css" href="./design.css" /> + <link rel="stylesheet" media="print" type="text/css" href="./print.css" /> + + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +</head> +<body> +<a href=.>start</a></br> + + + +<h1><a name="csv2tbx" id="csv2tbx">csv2tbx</a></h1> +<div class="level1"> + +<p> + +Convert between <acronym title="Comma Seperated Value">CSV</acronym> (Comma Separated Value) files and the <a href="toolkit-tbx.html" class="wikilink1" title="toolkit-tbx.html">TBX</a> format for terminology exchange. +</p> + +</div> +<!-- SECTION "csv2tbx" [1-123] --> +<h2><a name="usage" id="usage">Usage</a></h2> +<div class="level2"> +<pre class="code">csv2tbx [--charset=CHARSET] [--columnorder=COLUMNORDER] <csv> <tbx></pre> + +<p> + +Where: + +</p> +<table class="inline"> + <tr class="row0"> + <td class="col0 leftalign"> <csv> </td><td class="col1 leftalign"> is a <acronym title="Comma Seperated Value">CSV</acronym> file </td> + </tr> + <tr class="row1"> + <td class="col0 leftalign"> <tbx> </td><td class="col1"> is the target <acronym title="TermBase eXchange">TBX</acronym> file </td> + </tr> +</table> + +<p> + +Options (csv2tbx): + +</p> +<table class="inline"> + <tr class="row0"> + <td class="col0 leftalign"> --version </td><td class="col1 leftalign"> show program's version number and exit </td> + </tr> + <tr class="row1"> + <td class="col0 leftalign"> -h, --help </td><td class="col1 leftalign"> show this help message and exit </td> + </tr> + <tr class="row2"> + <td class="col0 leftalign"> --manpage </td><td class="col1 leftalign"> output a manpage based on the help </td> + </tr> + <tr class="row3"> + <td class="col0 leftalign"> <a href="toolkit-progress_progress.html" class="wikilink1" title="toolkit-progress_progress.html">--progress=PROGRESS</a> </td><td class="col1 leftalign"> show progress as: dots, none, bar, names, verbose </td> + </tr> + <tr class="row4"> + <td class="col0 leftalign"> <a href="toolkit-errorlevel_errorlevel.html" class="wikilink1" title="toolkit-errorlevel_errorlevel.html">--errorlevel=ERRORLEVEL</a> </td><td class="col1 leftalign"> show errorlevel as: none, message, exception, traceback </td> + </tr> + <tr class="row5"> + <td class="col0 leftalign"> -iINPUT, --input=INPUT </td><td class="col1 leftalign"> read from INPUT in csv format </td> + </tr> + <tr class="row6"> + <td class="col0 leftalign"> -xEXCLUDE, --exclude=EXCLUDE </td><td class="col1 leftalign"> exclude names matching EXCLUDE from input paths </td> + </tr> + <tr class="row7"> + <td class="col0 leftalign"> -oOUTPUT, --output=OUTPUT </td><td class="col1 leftalign"> write to OUTPUT in tbx format </td> + </tr> + <tr class="row8"> + <td class="col0 leftalign"> <a href="toolkit-psyco_mode.html" class="wikilink1" title="toolkit-psyco_mode.html">--psyco=MODE</a> </td><td class="col1 leftalign"> use psyco to speed up the operation, modes: none, full, profile </td> + </tr> + <tr class="row9"> + <td class="col0 leftalign"> --charset=CHARSET </td><td class="col1 leftalign"> set charset to decode from csv files </td> + </tr> + <tr class="row10"> + <td class="col0 leftalign"> --columnorder=COLUMNORDER </td><td class="col1 leftalign"> specify the order and position of columns (comment,source,target) </td> + </tr> +</table> + +</div> +<!-- SECTION "Usage" [124-1172] --> +<h2><a name="csv_file_layout" id="csv_file_layout">CSV file layout</a></h2> +<div class="level2"> + +<p> + +The <acronym title="Comma Seperated Value">CSV</acronym> file is expected in to have three columns, of which the default layout is + +</p> +<table class="inline"> + <tr class="row0"> + <th class="col0 leftalign"> Column </th><th class="col1 leftalign"> Data </th><th class="col2 leftalign"> Description </th> + </tr> + <tr class="row1"> + <td class="col0 centeralign"> A </td><td class="col1 leftalign"> comment </td><td class="col2 leftalign"> All the <acronym title="Gettext Portable Object">PO</acronym> #: location comments. These are not used in the <acronym title="TermBase eXchange">TBX</acronym> files, and can be left empty, but could be generated by <a href="toolkit-po2csv.html" class="wikilink1" title="toolkit-po2csv.html">po2csv</a> </td> + </tr> + <tr class="row2"> + <td class="col0 centeralign"> B </td><td class="col1"> Source Language (English) </td><td class="col2 leftalign"> The msgid or source string </td> + </tr> + <tr class="row3"> + <td class="col0 centeralign"> C </td><td class="col1 leftalign"> Target Language </td><td class="col2 leftalign"> The msgstr or target language </td> + </tr> +</table> + +</div> +<!-- SECTION "CSV file layout" [1173-1612] --> +<h2><a name="examples" id="examples">Examples</a></h2> +<div class="level2"> + +<p> + +These examples demonstrate the use of csv2tbx: + +</p> +<pre class="code">csv2tbx terms.csv terms.tbx</pre> + +<p> + +to simply convert <em>terms.csv</em> to <em>terms.tbx</em>. +</p> + +<p> +To convert a directory recursively to another directory with the same structure of files: + +</p> +<pre class="code">csv2tbx csv-dir tbx-target-dir</pre> + +<p> + +This will convert <acronym title="Comma Seperated Value">CSV</acronym> files in <em>csv-dir</em> to <acronym title="TermBase eXchange">TBX</acronym> files placed in <em>tbx-target-dir</em>. + +</p> +<pre class="code">csv2tbx --charset=windows-1250 csv tbx</pre> + +<p> + +Users working on Windows will often return files in encoding other the Unicode based encodings. In this case we convert +<acronym title="Comma Seperated Value">CSV</acronym> files found in <em>csv</em> from <em>windows-1250</em> to UTF-8 and place the correctly encoded files in <em>tbx</em>. Note that +UTF-8 is the only available destination encoding. +</p> + +</div> +<!-- SECTION "Examples" [1613-2309] --> +<h2><a name="two_column_csv" id="two_column_csv">Two column CSV</a></h2> +<div class="level2"> +<pre class="code">csv2tbx --columnorder=(source,target) foo.csv foo.tbx</pre> + +</div> +<!-- SECTION "Two column CSV" [2310-2394] --> +<h2><a name="notes" id="notes">Notes</a></h2> +<div class="level2"> + +<p> + +For conformance to the standards and to see which features are implemented, see <a href="toolkit-csv.html" class="wikilink1" title="toolkit-csv.html">csv</a> and <a href="toolkit-tbx.html" class="wikilink1" title="toolkit-tbx.html">tbx</a>. +</p> + +</div> +<!-- SECTION "Notes" [2395-2515] --> +<h2><a name="bugs" id="bugs">Bugs</a></h2> +<div class="level2"> + +<p> + +None. + +</p> + +</div> +<!-- SECTION "Bugs" [2516-] --></body> +</html> |