File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11build
22dist
3+ docs /html
34.tox
45* ~
56* .pyc
Original file line number Diff line number Diff line change 1+ # How to build the docs
2+ # =====================
3+ #
4+ # First, install sphinx with markdown support and read-the-docs theme:
5+ #
6+ # pip install sphinx sphinx-autobuild recommonmark sphinx_rtd_theme
7+ #
8+ # Then run sphinx-build in the docs directory:
9+ #
10+ # sphinx-build -b html docs docs/html
11+ #
12+
13+ from recommonmark .parser import CommonMarkParser
14+ from recommonmark .transform import AutoStructify
15+ import sphinx_rtd_theme
16+ import os
17+
18+ # Enable Read-the-Docs theme locally
19+ on_rtd = os .environ .get ('READTHEDOCS' , None ) == 'True'
20+ if not on_rtd :
21+ html_theme = "sphinx_rtd_theme"
22+ html_theme_path = [sphinx_rtd_theme .get_html_theme_path ()]
23+
24+ # Enable Markdown support for documentation
25+ source_parsers = {
26+ '.md' : CommonMarkParser ,
27+ }
28+ source_suffix = ['.rst' , '.md' ]
29+
30+ copyright = u"S. Astanin 2016"
31+
32+ # Enable automatic TOC generation
33+ def setup (app ):
34+ app .add_config_value ('recommonmark_config' , {
35+ 'enable_auto_toc_tree' : True ,
36+ 'auto_toc_tree_section' : 'Contents' ,
37+ }, True )
38+ app .add_transform (AutoStructify )
Original file line number Diff line number Diff line change 1+ # Overview
2+
3+ Tabulate is a a Python library and a command-line utility to pretty-print
4+ tabular data.
5+
6+ * [ Overview] ( index.md )
7+ * [ Installation] ( install.md )
8+ * [ Input data types] ( inputtypes.md )
9+ * [ Output formats] ( tableformats.md )
10+ * [ Command line utility] ( commandline.md )
11+
12+
13+ ## For Python Programmers
14+
15+ Tabulate is designed to print small tables easily:
16+
17+ - there is just [ one function to call] ( api.md ) , ` tabulate() `
18+ - it may take many [ tabular data types] ( inputtypes.md ) as input
19+ - the output layout is data-driven
20+
21+ Tabulate creates a readable presentation of mixed textual
22+ and numeric data
23+
24+ - textual and numeric columns are aligned automatically
25+ - numbers can be aligned by a decimal point
26+ - numbers' format is configurable
27+
28+ Tabulate may be used to author tabular data for lightweight
29+ plain-text markup:
30+
31+ - Markdown
32+ - ReStructuredText
33+ - org-mode
34+ - MediaWiki
35+ - MoinMoin
36+ - LaTeX
37+ - and some other [ output formats] ( tableformats.md ) are supported.
38+
39+ Tabulate is a single-file library distributed under MIT license.
40+ It can be easily bundled with other projects.
41+
42+
43+ ## For Non-Programmers
44+
45+ Non-programmers may use the [ command line utility] ( commandline.md )
46+ to pretty-print tabular data from a plain-text file.
Original file line number Diff line number Diff line change 1+ Installation
2+ ============
3+
4+ Library and Command Line Utility
5+ --------------------------------
6+
7+ To install the Python library and the command line utility, run::
8+
9+ ``` bash
10+ pip install tabulate
11+ ```
12+
13+ The command line utility will be installed as ` tabulate ` to ` bin ` on Linux
14+ (e.g. ` /usr/bin ` ); or as ` tabulate.exe ` to ` Scripts ` in your Python
15+ installation on Windows (e.g. ` C:\Python27\Scripts\tabulate.exe ` ).
16+
17+ You may consider installing the library only for the current user::
18+
19+ ``` bash
20+ pip install tabulate --user
21+ ```
22+
23+ In this case the command line utility will be installed to ` ~/.local/bin/tabulate `
24+ on Linux and to ` %APPDATA%\Python\Scripts\tabulate.exe ` on Windows.
25+
26+ Library Only
27+ ------------
28+
29+ To install just the library on Unix-like operating systems::
30+
31+ ``` bash
32+ TABULATE_INSTALL=lib-only pip install tabulate
33+ ```
34+
35+ On Windows::
36+
37+ ``` powershell
38+ set TABULATE_INSTALL=lib-only
39+ pip install tabulate
40+ ```
Original file line number Diff line number Diff line change 1+
You can’t perform that action at this time.
0 commit comments