Skip to content

Commit ebd9ec2

Browse files
committed
update README: tabulate CLI installation and usage
1 parent a342997 commit ebd9ec2

File tree

1 file changed

+35
-2
lines changed

1 file changed

+35
-2
lines changed

README.rst

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@ To install the Python library and the command line utility, run::
2525

2626
pip install tabulate
2727

28+
The command line utility will be installed as ``tabulate`` to ``bin`` on Linux
29+
(e.g. ``/usr/bin``); or as ``tabulate.exe`` to ``Scripts`` in your Python
30+
installation on Windows (e.g. ``C:\Python27\Scripts\tabulate.exe``).
31+
32+
You may consider installing the library only for the current user::
33+
34+
pip install tabulate --user
35+
36+
In this case the command line utility will be installed to ``~/.local/bin/tabulate``
37+
on Linux and to ``%APPDATA%\Python\Scripts\tabulate.exe`` on Windows.
38+
2839
To install just the library on Unix-like operating systems::
2940

3041
TABULATE_INSTALL=lib-only pip install tabulate
@@ -43,8 +54,8 @@ Build status
4354
:target: https://drone.io/bitbucket.org/astanin/python-tabulate/latest
4455

4556

46-
Usage
47-
-----
57+
Library usage
58+
-------------
4859

4960
The module provides just one function, ``tabulate``, which takes a
5061
list of lists or another tabular data type as the first argument,
@@ -343,6 +354,28 @@ columns of decimal numbers. Use ``floatfmt`` named argument::
343354
-- ------
344355

345356

357+
Usage of the command line utility
358+
---------------------------------
359+
360+
::
361+
362+
Usage: tabulate [options] [FILE ...]
363+
364+
FILE a filename of the file with tabular data;
365+
if "-" or missing, read data from stdin.
366+
367+
Options:
368+
369+
-h, --help show this message
370+
-1, --header use the first row of data as a table header
371+
-o FILE, --output FILE print table to FILE (default: stdout)
372+
-s REGEXP, --sep REGEXP use a custom column separator (default: whitespace)
373+
-f FMT, --format FMT set output table format; supported formats:
374+
plain, simple, grid, fancy_grid, pipe, orgtbl,
375+
rst, mediawiki, html, latex, latex_booktabs, tsv
376+
(default: simple)
377+
378+
346379
Performance considerations
347380
--------------------------
348381

0 commit comments

Comments
 (0)