Skip to content

Commit 6d95a50

Browse files
committed
Add sqlformat manpage, by Andriy Senkovych.
1 parent 948c855 commit 6d95a50

2 files changed

Lines changed: 65 additions & 1 deletion

File tree

MANIFEST.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ include COPYING
44
include TODO
55
include AUTHORS
66
include CHANGES
7-
include Makefile
7+
include Makefile
8+
include docs/sqlformat.1

docs/sqlformat.1

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
.\" Based on template /usr/share/man-db/examples/manpage.example provided by
2+
.\" Tom Christiansen <[email protected]>.
3+
.TH SQLFORMAT "1" "December 2010" "python-sqlparse version: 0.1.2" "User Commands"
4+
.SH NAME
5+
sqlformat \- reformat SQL file
6+
.SH SYNOPSIS
7+
.PP
8+
.B sqlformat
9+
[
10+
.I "OPTION"
11+
] ... [
12+
.I "FILE"
13+
] ...
14+
.SH DESCRIPTION
15+
.\" Putting a newline after each sentence can generate better output.
16+
The `sqlformat' command-line tool can be used to reformat SQL file according to
17+
specified options or prepare a snippet in in some programming language (only
18+
Puthon and PHP currently supported).
19+
Use "-" as
20+
.I FILE
21+
to read from stdin.
22+
.SH OPTIONS
23+
.TP
24+
\fB\-i\fR \fICHOICE\fR|\fB\-\-identifiers\fR=\fIFORMAT\fR
25+
Change case of identifiers.
26+
.I FORMAT
27+
is one of "upper", "lower", "capitalize".
28+
.TP
29+
\fB\-k\fR \fICHOICE\fR|\fB\-\-keywords\fR=\fIFORMAT\fR
30+
Change case of keywords.
31+
.I FORMAT
32+
is one of "upper", "lower", "capitalize".
33+
.TP
34+
\fB\-l\fR \fICHOICE\fR|\fB\-\-language\fR=\fILANG\fR
35+
Output a snippet in programming language LANG.
36+
.I LANG
37+
can be "python", "php".
38+
.TP
39+
\fB\-o\fR \fIFILE\fR|\fB\-\-outfile\fR=\fIFILE\fR
40+
Write output to
41+
.I FILE
42+
(defaults to stdout).
43+
.TP
44+
.BR \-r | \-\-reindent
45+
Reindent statements.
46+
.TP
47+
\fB\-\-indent_width\fR=\fIINDENT_WIDTH\fR
48+
Set indent width to
49+
.IR INDENT_WIDTH .
50+
Default is 2 spaces.
51+
.TP
52+
\fB\-\-strip\-comments
53+
Remove comments.
54+
.TP
55+
.BR \-h | \-\-help
56+
Print a short help message and exit.
57+
All subsequent options are ignored.
58+
.TP
59+
.BR --verbose
60+
Verbose output.
61+
.TP
62+
.BR \-\-version
63+
Print program's version number and exit.

0 commit comments

Comments
 (0)