-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
43 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# tsdump | ||
[![Build Status](https://travis-ci.org/voidint/tsdump.svg?branch=master)](https://travis-ci.org/voidint/tsdump) | ||
[![Build Status](https://api.travis-ci.org/voidint/tsdump.png)](https://travis-ci.org/voidint/tsdump) | ||
[![Coverage Status](https://coveralls.io/repos/github/voidint/tsdump/badge.svg?branch=master)](https://coveralls.io/github/voidint/tsdump?branch=master) | ||
|
||
## 目录 | ||
|
@@ -20,27 +20,29 @@ $ go get -u github.com/voidint/tsdump | |
## 基本使用 | ||
|
||
```shell | ||
$ tsdump --help | ||
NAME: | ||
tsdump - Database table structure dump tool. | ||
|
||
USAGE: | ||
tsdump [OPTIONS] [database [table ...]] | ||
|
||
VERSION: | ||
0.2.0 | ||
0.3.0 | ||
|
||
AUTHOR: | ||
voidnt <[email protected]> | ||
|
||
OPTIONS: | ||
-D, --debug enable debug mode | ||
-h value, --host value connect to host (default: "127.0.0.1") | ||
-P value, --port value port number to use for connection (default: 3306) | ||
-u value, --user value user for login if not current user (default: "voidint") | ||
-V value, --viewer value output viewer. Optional values: txt|csv|json|md (default: "txt") | ||
-o value, --output value write to a file, instead of STDOUT | ||
--help show help | ||
--version, -v print the version | ||
-D, --debug enable debug mode | ||
-h value, --host value connect to host (default: "127.0.0.1") | ||
-P value, --port value port number to use for connection (default: 3306) | ||
-u value, --user value user for login if not current user (default: "voidint") | ||
-p value, --password value password to use when connecting to server. If password is not given it's solicited on the tty. | ||
-V value, --viewer value output viewer. Optional values: txt|csv|json|md (default: "txt") | ||
-o value, --output value write to a file, instead of STDOUT | ||
--help show help | ||
--version, -v print the version | ||
COPYRIGHT: | ||
Copyright (c) 2017, 2018, voidint. All rights reserved. | ||
|
@@ -126,23 +128,27 @@ COPYRIGHT: | |
- 将用户权限范围内数据库及其表结构数据输出到csv文件 | ||
```shell | ||
$ tsdump -h 127.0.0.1 -P 3307 -u root -V csv -o ./mydb.csv | ||
$ tsdump -h 127.0.0.1 -P 3307 -u root -V csv > ./mydb.csv | ||
``` | ||
- 将目标数据库及其所有表的表结构数据输出到JSON文件 | ||
```shell | ||
$ tsdump -h 127.0.0.1 -P 3307 -u root -V json -o mydb.json mydb | ||
$ tsdump -h 127.0.0.1 -P 3307 -u root -V json mydb > mydb.json | ||
``` | ||
## Changelog | ||
### 0.3.0 - 2018/01/05 | ||
- `Add feature`: 支持通过`-p`选项指定数据库登录密码。[#16](https://github.com/voidint/tsdump/issues/16) | ||
- `Fixbug`: 标准输出重定向后获得的内容中包含有`Enter Password:`字样。[#17](https://github.com/voidint/tsdump/issues/17) | ||
### 0.2.0 - 2018/01/01 | ||
- 支持从stdin console中读取数据库登录密码。[#5](https://github.com/voidint/tsdump/issues/5) | ||
- 修正help信息。[#6](https://github.com/voidint/tsdump/issues/6) | ||
- 支持命令行参数指定目标数据库和表。[#12](https://github.com/voidint/tsdump/issues/12) | ||
- 支持通过`-h`选项指定主机名。[#14](https://github.com/voidint/tsdump/issues/14) | ||
- `Add feature`: 支持从stdin console中读取数据库登录密码。[#5](https://github.com/voidint/tsdump/issues/5) | ||
- `Fixbug`: 修正help信息。[#6](https://github.com/voidint/tsdump/issues/6) | ||
- `Add feature`: 支持命令行参数指定目标数据库和表。[#12](https://github.com/voidint/tsdump/issues/12) | ||
- `Add feature`: 支持通过`-h`选项指定主机名。[#14](https://github.com/voidint/tsdump/issues/14) | ||
### 0.1.0 - 2017/12/31 | ||
- 支持以`csv`视图方式导出表结构数据。[#1](https://github.com/voidint/tsdump/issues/1) | ||
- 支持以`markdown`视图方式导出表结构数据。[#2](https://github.com/voidint/tsdump/issues/2) | ||
- 支持以`text`视图方式导出表结构数据。[#3](https://github.com/voidint/tsdump/issues/3) | ||
- 支持以`json`视图方式导出表结构数据。[#4](https://github.com/voidint/tsdump/issues/4) | ||
- `Add feature`: 支持以`csv`视图方式导出表结构数据。[#1](https://github.com/voidint/tsdump/issues/1) | ||
- `Add feature`: 支持以`markdown`视图方式导出表结构数据。[#2](https://github.com/voidint/tsdump/issues/2) | ||
- `Add feature`: 支持以`text`视图方式导出表结构数据。[#3](https://github.com/voidint/tsdump/issues/3) | ||
- `Add feature`: 支持以`json`视图方式导出表结构数据。[#4](https://github.com/voidint/tsdump/issues/4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters