]> git.phdru.name Git - sqlconvert.git/blobdiff - docs/index.rst
Rename mysql-to-sql.py -> mysql2py
[sqlconvert.git] / docs / index.rst
index 06beefeadd404f62a65c1c9fb1767084a36e3848..8b73c1a1e1061394776a39d01c7859b81d506be7 100644 (file)
@@ -20,24 +20,41 @@ The program is in its initial phase and currently cannot do much.
 Command line
 ------------
 
-mysql-to-sql.py
-~~~~~~~~~~~~~~~
+mysql2sql
+~~~~~~~~~
 
 Usage::
 
-    mysql-to-sql.py [-i infile] [-o outfile]
+    mysql2sql [-e encoding] [-E output_encoding] [infile] [[-o] outfile]
 
 Options::
 
-    -i, --infile infile    Input file, stdin if absent
-    -o, --outfile outfile  Output file, stdout if absent
+   -e ENCODING, --encoding ENCODING
+                           input/output encoding, default is utf-8
+   -E OUTPUT_ENCODING, --output-encoding OUTPUT_ENCODING
+                           separate output encoding, default is the same as
+                           `-e` except for console; for console output charset
+                           from the current locale is used
+    infile                 Input file, stdin if absent or '-'
+    -o, --outfile outfile  Output file, stdout if absent or '-'
+
+Option `-o` is useful when infile is absent (input is redirected), for
+example::
+
+    mysql2sql -o outfile.sql < infile.sql
+    cat infile.sql | mysql2sql -o outfile.sql
+
+But of course it simply can be::
+
+    mysql2sql - outfile.sql < infile.sql
+    cat infile.sql | mysql2sql - outfile.sql
 
 
 Indices and tables
 ==================
 
 * :ref:`genindex`
-* :ref:`modindex`
+* `<api/modules.html>`_
 * :ref:`search`