Skip to content

Commit f456c1f

Browse files
author
Elliot Boschwitz
authored
Updated homepage, installation, and usage docs (#429)
* New README.md for homepage * New README.md for docs/installation (before and after), replacing old installation_guide.md * Improved Linux installation docs * Improved usage docs (before and after): added config file section, other minor changes * Brings documentation back to our PyPI profile site
1 parent 4a93082 commit f456c1f

File tree

9 files changed

+210
-564
lines changed

9 files changed

+210
-564
lines changed

README.md

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
[![PyPI](https://badge.fury.io/py/mssql-cli.svg)](https://pypi.python.org/pypi/mssql-cli)
2+
[![Python 2.7|3.4|3.5|3.6|3.7|3.8](https://img.shields.io/badge/python-2.7 | 3.4 | 3.5 | 3.6 | 3.7 | 3.8-blue.svg)](https://github.com/dbcli/mssql-cli)
3+
4+
# mssql-cli
5+
[**mssql-cli**](https://github.com/dbcli/mssql-cli) is an interactive command line query tool for SQL Server. This open source tool works cross-platform and proud to be a part of the [dbcli](github.com/dbcli) community.
6+
7+
![mssql-cli Autocomplete](https://github.com/dbcli/mssql-cli/raw/master/screenshots/mssql-cli-autocomplete.gif)
8+
9+
mssql-cli supports a rich interactive command line experience, with features such as:
10+
- **Auto-completion**: fewer keystrokes needed to complete complicated queries.
11+
- **Syntax highlighting**: highlights T-SQL keywords.
12+
- **Query history**: easily complete an auto-suggested query that was previously executed.
13+
- **Configuration file support**: customize the mssql-cli experience for your needs.
14+
- **Multi-line queries**: execute multiple queries at once using the multi-line edit mode.
15+
- **Non-interactive support**: execute a query without jumping into the interactive experience.
16+
17+
## Quick Start
18+
Read the section below to quickly get started with mssql-cli. Consult the [usage guide](https://github.com/dbcli/mssql-cli/tree/master/doc/usage_guide.md) for a deeper dive into mssql-cli features.
19+
20+
### Install mssql-cli
21+
Platform-specific installation instructions are below:
22+
| [Windows](https://github.com/dbcli/mssql-cli/blob/master/doc/installation/windows.md#windows-installation) | [macOS](https://github.com/dbcli/mssql-cli/blob/master/doc/installation/macos.md#macos-installation) | [Linux](https://github.com/dbcli/mssql-cli/blob/master/doc/installation/linux.md) |
23+
| - | - | - |
24+
25+
Visit the [installation reference guide](https://github.com/dbcli/mssql-cli/tree/master/doc/installation) to view all supported releases and downloads.
26+
27+
#### Install with Linux Package Manager
28+
Follow the [Linux installation instructions]('https://github.com/dbcli/mssql-cli/blob/master/doc/installation/linux.md') to install mssql-cli using `apt-get`, `yum`, and other Linux package managers.
29+
30+
#### Install with pip
31+
```sh
32+
python -m pip install mssql-cli
33+
```
34+
Please refer to the [pip installation docs](https://github.com/dbcli/mssql-cli/blob/master/doc/installation/pip.md) for more platform-specific information.
35+
36+
### Connect to Server
37+
Complete the command below to connect to your server:
38+
```sh
39+
mssql-cli -S <server URL> -d <database name> -U <username> -P <password>
40+
```
41+
42+
### Exit mssql-cli
43+
Press **Ctrl+D** or type `quit`.
44+
45+
### Show Options
46+
For general help content, pass in the `-h` parameter:
47+
```sh
48+
mssql-cli --help
49+
```
50+
51+
### Usage Docs
52+
Please refer to the [usage guide](https://github.com/dbcli/mssql-cli/tree/master/doc/usage_guide.md) for details on options and example usage. If you are having any issues using mssql-cli, please see the [troubleshooting guide](https://github.com/dbcli/mssql-cli/blob/master/doc/troubleshooting_guide.md).
53+
54+
## Telemetry
55+
The mssql-cli tool includes a telemetry feature. Please refer to the [telemetry guide](https://github.com/dbcli/mssql-cli/tree/master/doc/telemetry_guide.md) for more information.
56+
57+
## Contributing
58+
If you would like to contribute to the project, please refer to the [development guide](https://github.com/dbcli/mssql-cli/tree/master/doc/development_guide.md).
59+
60+
## Contact Us
61+
If you encounter any bugs or would like to leave a feature request, please file an issue in the
62+
[**Issues**](https://github.com/dbcli/mssql-cli/issues) section of our GitHub repo.
63+
64+
## Code of Conduct
65+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact
66+
[email protected] with any additional questions or comments.
67+
68+
## License
69+
mssql-cli is licensed under the [BSD-3 license](https://github.com/dbcli/mssql-cli/blob/master/LICENSE.txt).

README.rst

-147
This file was deleted.

build.py

+10-5
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,15 @@ def build():
7676

7777
print_heading('Building mssql-cli pip package')
7878
utility.exec_command('%s --version' % PYTHON, utility.ROOT_DIR)
79-
utility.exec_command('%s setup.py check -r -s bdist_wheel --plat-name %s' % (PYTHON, plat),
79+
utility.exec_command('%s setup.py bdist_wheel --plat-name %s' % (PYTHON, plat),
8080
utility.ROOT_DIR,
8181
continue_on_error=False)
8282

83+
# checks if long description will render correctly
84+
utility.exec_command('twine check {}'
85+
.format(os.path.join(utility.MSSQLCLI_DIST_DIRECTORY, '*')),
86+
utility.ROOT_DIR, continue_on_error=False)
87+
8388
# Copy back the SqlToolsService binaries for this platform.
8489
clean_and_copy_sqltoolsservice(utility.get_current_platform())
8590
copy_and_rename_wheels()
@@ -126,9 +131,8 @@ def validate_package():
126131
# cache overshadowing actual changes made.
127132
current_platform = utility.get_current_platform()
128133

129-
mssqlcli_wheel_name = [
130-
pkge for pkge in mssqlcli_wheel_dir if current_platform in pkge and
131-
'dev-latest' not in pkge]
134+
mssqlcli_wheel_name = [pkge for pkge in mssqlcli_wheel_dir
135+
if current_platform in pkge and 'dev-latest' not in pkge]
132136
utility.exec_command(
133137
'{0} install --no-cache-dir --no-index ./dist/{1}'.format(
134138
PIP,
@@ -150,6 +154,7 @@ def unit_test():
150154
get_active_test_filepaths()),
151155
utility.ROOT_DIR, continue_on_error=False)
152156

157+
153158
def unstable_unit_test():
154159
"""
155160
Run all unstable unit tests.
@@ -217,7 +222,7 @@ def generate_mo(extraction_target_path, lang_name, trans_mappings, domain, local
217222
"""
218223
extraction_target_dir = extraction_target_path\
219224
if os.path.isdir(extraction_target_path) else os.path.dirname(extraction_target_path)
220-
localedir = localedir if (not localedir is None) \
225+
localedir = localedir if localedir is not None \
221226
else os.path.join(extraction_target_dir, 'locale')
222227
mo_dir = os.path.join(localedir, lang_name, 'LC_MESSAGES')
223228
create_dir([extraction_target_dir, 'locale', lang_name, 'LC_MESSAGES'])

doc/installation/README.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Install mssql-cli
2+
3+
## Official Installation of mssql-cli
4+
5+
Select your platform for mssql-cli installation instructions:
6+
7+
| [Windows](https://github.com/dbcli/mssql-cli/blob/master/doc/installation/windows.md#windows-installation) | [macOS](https://github.com/dbcli/mssql-cli/blob/master/doc/installation/macos.md#macos-installation) | [Linux](https://github.com/dbcli/mssql-cli/blob/master/doc/installation/linux.md) |
8+
| - | - | - |
9+
10+
11+
## Direct Downloads
12+
13+
The instructions above are the preferred installation method. Direct downloads are provided as an alternative in the
14+
scenario that your machine may not have access to the Microsoft package repository. Instructions for direct downloads can
15+
also be found in the links above.
16+
17+
| Supported Platform |Latest Stable |
18+
|--------------------------------------------|------------------------------|
19+
| Windows (x64) |[.whl][whl-win-x64] |
20+
| Windows (x86) |[.whl][whl-win-x86] |
21+
| macOS 10.12+ |[.whl][whl-macos] |
22+
| Ubuntu 14.04+ |[.deb][deb] |
23+
| Debian 8.7+ |[.deb][deb] |
24+
| CentOS 7+ |[.rpm][rpm] |
25+
| Red Hat Enterprise Linux 7+ |[.rpm][rpm] |
26+
| openSUSE |[.rpm][rpm] |
27+
| Fedora 25+ |[.rpm][rpm] |
28+
29+
[deb]: https://packages.microsoft.com/ubuntu/14.04/prod/pool/main/m/mssql-cli/mssql-cli_0.15.0-1_all.deb
30+
[rpm]: https://packages.microsoft.com/rhel/7/prod/mssql-cli-0.15.0-1.el7.x86_64.rpm
31+
[whl-win-x64]: https://files.pythonhosted.org/packages/79/31/1be42f3632a30bb126e02cda4312b797f5f2cdef60b9c62596196a475037/mssql_cli-0.15.0-py2.py3-none-win_amd64.whl
32+
[whl-win-x86]: https://files.pythonhosted.org/packages/21/8c/9829c2094b4f179f9c2f4548b2ba089867f84a3758cb70575ef2a905e877/mssql_cli-0.15.0-py2.py3-none-win32.whl
33+
[whl-macos]: https://files.pythonhosted.org/packages/43/5d/c9af6aec5b491e7b0c5ccf00b4b8062282d6c4cfb4c0417891bd6013e299/mssql_cli-0.15.0-py2.py3-none-macosx_10_11_intel.whl

0 commit comments

Comments
 (0)