]> git.phdru.name Git - sqlconvert.git/blob - docs/index.rst
genapidocs: replace short options with long ones
[sqlconvert.git] / docs / index.rst
1 .. mysql2sql documentation master file, created by
2    sphinx-quickstart on Fri Jul 22 19:32:24 2016.
3    You can adapt this file completely to your liking, but it should at least
4    contain the root `toctree` directive.
5
6 Welcome to mysql2sql's documentation!
7 =====================================
8
9 This is mysql2sql, a mysql to sql converter. It is primary intended to
10 convert mysqldump (especially with extended INSERT syntax) to standard
11 SQL to load at least to PostgreSQL or SQLite.
12
13 It uses `sqlparse <https://github.com/andialbrecht/sqlparse>`_ to parse
14 SQL.
15
16 The program is in its initial phase and currently cannot do much.
17
18 .. highlight:: none
19
20 Command line
21 ------------
22
23 mysql-to-sql.py
24 ~~~~~~~~~~~~~~~
25
26 Usage::
27
28     mysql-to-sql.py [-e encoding] [-E output_encoding] [infile] [[-o] outfile]
29
30 Options::
31
32    -e ENCODING, --encoding ENCODING
33                            input/output encoding, default is utf-8
34    -E OUTPUT_ENCODING, --output-encoding OUTPUT_ENCODING
35                            separate output encoding, default is the same as
36                            `-e` except for console; for console output charset
37                            from the current locale is used
38     infile                 Input file, stdin if absent or '-'
39     -o, --outfile outfile  Output file, stdout if absent or '-'
40
41 Option `-o` is useful when infile is absent (input is redirected), for
42 example::
43
44     mysql-to-sql.py -o outfile.sql < infile.sql
45     cat infile.sql | mysql-to-sql.py -o outfile.sql
46
47 But of course it simple can be::
48
49     mysql-to-sql.py - outfile.sql < infile.sql
50     cat infile.sql | mysql-to-sql.py - outfile.sql
51
52
53 Indices and tables
54 ==================
55
56 * :ref:`genindex`
57 * `<api/modules.html>`_
58 * :ref:`search`
59
60
61 Credits
62 =======
63
64 Created by Oleg Broytman <phd@phdru.name>.
65
66 Copyright (C) 2016 PhiloSoft Design.
67
68
69 License
70 =======
71
72 GPL.