X-Git-Url: https://git.phdru.name/?p=sqlconvert.git;a=blobdiff_plain;f=docs%2Findex.rst;h=49cb311151e8825fa19315cc6b91e54dcf2e4a1d;hp=06beefeadd404f62a65c1c9fb1767084a36e3848;hb=4c93c3d89685aba33fc45082022373eb93b6583e;hpb=84c37038181c538386a5f152dc486f8a8664a7c0 diff --git a/docs/index.rst b/docs/index.rst index 06beefe..49cb311 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -25,19 +25,36 @@ mysql-to-sql.py Usage:: - mysql-to-sql.py [-i infile] [-o outfile] + mysql-to-sql.py [-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:: + + mysql-to-sql.py -o outfile.sql < infile.sql + cat infile.sql | mysql-to-sql.py -o outfile.sql + +But of course it simple can be:: + + mysql-to-sql.py - outfile.sql < infile.sql + cat infile.sql | mysql-to-sql.py - outfile.sql Indices and tables ================== * :ref:`genindex` -* :ref:`modindex` +* ``_ * :ref:`search`