X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=docs%2Findex.rst;h=242918a82b9662afe66a49842caaa5a6d2d06e45;hb=447c2ab10de0e28b7d6ecc95c3c2aaf0efddebd3;hp=01e8420688098a43f00ecf97894279e3d4ce3e53;hpb=16c2bcbc29f78bf54fb7ffee9577d1d88216ebbc;p=sqlconvert.git diff --git a/docs/index.rst b/docs/index.rst index 01e8420..242918a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -6,17 +6,71 @@ Welcome to mysql2sql's documentation! ===================================== -Contents: +This is mysql2sql, a mysql to sql converter. It is primary intended to +convert mysqldump (especially with extended INSERT syntax) to standard +SQL to load at least to PostgreSQL or SQLite. -.. toctree:: - :maxdepth: 2 +It uses `sqlparse `_ to parse +SQL. +The program is in its initial phase and currently cannot do much. + +.. highlight:: none + +Command line +------------ + +mysql2sql +~~~~~~~~~ + +Usage:: + + mysql2sql [-e encoding] [-E output_encoding] [infile] [[-o] outfile] + +Options:: + + -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 + -P, --no-pbar Inhibit progress bar + infile Input file, stdin if absent or '-' + -o, --outfile outfile Output file, stdout if absent or '-' + +If stderr is connected to the console the program displays a text mode progress +bar. Option `-P/--no-pbar` inhibits it. + +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` +* ``_ * :ref:`search` + +Credits +======= + +Created by Oleg Broytman . + +Copyright (C) 2016 PhiloSoft Design. + + +License +======= + +GPL.