[Python-modules-commits] [terminaltables] 01/10: import terminaltables-3.1.0.orig.tar.gz

Carl Suster arcresu-guest at moszumanska.debian.org
Sat Jan 7 05:20:00 UTC 2017


This is an automated email from the git hooks/post-receive script.

arcresu-guest pushed a commit to branch master
in repository terminaltables.

commit f687517a78f1a2cda5e071df2dfd71fcbf1a1588
Author: Carl Suster <carl at contraflo.ws>
Date:   Fri Jan 6 23:42:57 2017 +1100

    import terminaltables-3.1.0.orig.tar.gz
---
 .gitignore                                         |  96 +++++++
 .travis.yml                                        |  48 ++++
 CONTRIBUTING.md                                    |  47 ++++
 LICENSE                                            |  21 ++
 README.rst                                         | 162 +++++++++++
 appveyor.yml                                       |  33 +++
 docs/_templates/layout.html                        |   6 +
 docs/asciitable.png                                | Bin 0 -> 44856 bytes
 docs/asciitable.rst                                |  16 ++
 docs/changelog.rst                                 |   5 +
 docs/conf.py                                       |  53 ++++
 docs/doubletable.png                               | Bin 0 -> 45812 bytes
 docs/doubletable.rst                               |  33 +++
 docs/examples.png                                  | Bin 0 -> 72612 bytes
 docs/favicon.ico                                   | Bin 0 -> 1150 bytes
 docs/githubtable.png                               | Bin 0 -> 40167 bytes
 docs/githubtable.rst                               |  27 ++
 docs/githubtable_rendered.png                      | Bin 0 -> 53983 bytes
 docs/index.rst                                     |  77 +++++
 docs/install.rst                                   |  38 +++
 docs/key.enc                                       | Bin 0 -> 3248 bytes
 docs/quickstart.rst                                | 110 ++++++++
 docs/settings.rst                                  |  79 ++++++
 docs/singletable.png                               | Bin 0 -> 44507 bytes
 docs/singletable.rst                               |  26 ++
 example1.py                                        |  42 +++
 example2.py                                        |  86 ++++++
 example3.py                                        |  36 +++
 setup.py                                           | 111 ++++++++
 terminaltables/__init__.py                         |  17 ++
 terminaltables/ascii_table.py                      |  55 ++++
 terminaltables/base_table.py                       | 217 ++++++++++++++
 terminaltables/build.py                            | 151 ++++++++++
 terminaltables/github_table.py                     |  70 +++++
 terminaltables/other_tables.py                     | 177 ++++++++++++
 terminaltables/terminal_io.py                      |  98 +++++++
 terminaltables/width_and_alignment.py              | 160 +++++++++++
 tests/__init__.py                                  |   5 +
 tests/screenshot.py                                | 292 +++++++++++++++++++
 tests/test_all_tables_e2e/__init__.py              |   1 +
 tests/test_all_tables_e2e/sub_ascii_win10.bmp      | Bin 0 -> 36870 bytes
 tests/test_all_tables_e2e/sub_ascii_winxp.bmp      | Bin 0 -> 49350 bytes
 tests/test_all_tables_e2e/sub_double_win10.bmp     | Bin 0 -> 36090 bytes
 tests/test_all_tables_e2e/sub_double_win10b.bmp    | Bin 0 -> 36090 bytes
 tests/test_all_tables_e2e/sub_double_winxp.bmp     | Bin 0 -> 48726 bytes
 tests/test_all_tables_e2e/sub_single_win10.bmp     | Bin 0 -> 34854 bytes
 tests/test_all_tables_e2e/sub_single_win10b.bmp    | Bin 0 -> 34854 bytes
 tests/test_all_tables_e2e/sub_single_winxp.bmp     | Bin 0 -> 45954 bytes
 tests/test_all_tables_e2e/test_ascii_table.py      | 145 ++++++++++
 tests/test_all_tables_e2e/test_double_table.py     | 245 ++++++++++++++++
 tests/test_all_tables_e2e/test_github_table.py     |  77 +++++
 tests/test_all_tables_e2e/test_porcelain_table.py  |  59 ++++
 tests/test_all_tables_e2e/test_single_table.py     | 171 +++++++++++
 .../test_single_table_windows.py                   | 246 ++++++++++++++++
 tests/test_ascii_table.py                          | 108 +++++++
 tests/test_base_table/test_gen_row_lines.py        |  86 ++++++
 tests/test_base_table/test_gen_table.py            | 225 +++++++++++++++
 tests/test_base_table/test_horizontal_border.py    |  98 +++++++
 tests/test_base_table/test_table.py                | 196 +++++++++++++
 tests/test_build/test_build_border.py              | 312 +++++++++++++++++++++
 tests/test_build/test_build_row.py                 | 104 +++++++
 tests/test_build/test_combine.py                   |  37 +++
 tests/test_build/test_flatten.py                   |  25 ++
 tests/test_examples.py                             |  32 +++
 tests/test_terminal_io/__init__.py                 |  45 +++
 tests/test_terminal_io/sub_title_ascii_win10.bmp   | Bin 0 -> 1998 bytes
 tests/test_terminal_io/sub_title_ascii_win2012.bmp | Bin 0 -> 3048 bytes
 tests/test_terminal_io/sub_title_ascii_winxp.bmp   | Bin 0 -> 2070 bytes
 tests/test_terminal_io/sub_title_cjk_win10.bmp     | Bin 0 -> 4278 bytes
 tests/test_terminal_io/sub_title_cjk_win2012.bmp   | Bin 0 -> 6896 bytes
 tests/test_terminal_io/sub_title_cjk_winxp.bmp     | Bin 0 -> 4322 bytes
 tests/test_terminal_io/test_get_console_info.py    |  28 ++
 tests/test_terminal_io/test_set_terminal_title.py  | 110 ++++++++
 tests/test_terminal_io/test_terminal_size.py       |  54 ++++
 .../test_align_and_pad_cell.py                     | 202 +++++++++++++
 .../test_column_max_width.py                       | 107 +++++++
 .../test_max_dimensions.py                         | 100 +++++++
 tests/test_width_and_alignment/test_table_width.py |  70 +++++
 .../test_width_and_alignment/test_visible_width.py |  59 ++++
 tox.ini                                            |  77 +++++
 80 files changed, 5413 insertions(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..53889c8
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,96 @@
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+env/
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+*.egg-info/
+.installed.cfg
+*.egg
+
+# PyInstaller
+#  Usually these files are written by a python script from a template
+#  before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*,cover
+.hypothesis/
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+local_settings.py
+
+# Flask stuff:
+instance/
+.webassets-cache
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
+
+# IPython Notebook
+.ipynb_checkpoints
+
+# pyenv
+.python-version
+
+# celery beat schedule file
+celerybeat-schedule
+
+# dotenv
+.env
+
+# virtualenv
+venv/
+ENV/
+
+# Spyder project settings
+.spyderproject
+
+# Rope project settings
+.ropeproject
+
+# Robpol86
+test*.png
+*.rpm
+.idea/
+requirements*.txt
+.DS_Store
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..1f9f3ed
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,48 @@
+# Configure.
+env: TOX_ENV=py
+language: python
+matrix:
+  include:
+    - python: 3.5
+      env: TOX_ENV=lint
+      after_success:
+        - echo
+    - python: 3.5
+      env: TOX_ENV=docs
+      after_success:
+        - eval "$(ssh-agent -s)"; touch docs/key; chmod 0600 docs/key
+        - openssl aes-256-cbc -d -K "$encrypted_c89fed6a587d_key" -iv "$encrypted_c89fed6a587d_iv"
+          < docs/key.enc > docs/key && ssh-add docs/key
+        - git config --global user.email "builds at travis-ci.com"
+        - git config --global user.name "Travis CI"
+        - git remote set-url --push origin "git at github.com:$TRAVIS_REPO_SLUG"
+        - export ${!TRAVIS*}
+        - tox -e docsV
+python:
+  - 3.5
+  - 3.4
+  - 3.3
+  - pypy3
+  - pypy
+  - 2.7
+  - 2.6
+sudo: false
+
+# Run.
+install: pip install tox
+script: tox -e $TOX_ENV
+after_success:
+  - bash <(curl -s https://codecov.io/bash)
+
+# Deploy.
+deploy:
+  provider: pypi
+  user: Robpol86
+  password:
+    secure:
+      "aj+Hl25+NbtmKpHcqxxNJhaMmawgzEPdLX+NwxwAZuTrvUCdiMtYhF9qxN0USHIlXSGDNc\
+      7ua6nNpYPhjRv7j5YM4uLlK+4Fv/iU+iQcVfy89BS4vlXzUoje6nLIhogsxytb+FjdGZ0PK\
+      JzzxfYr0relUjui/gPYmTQoZ1IiT8A="
+  on:
+    condition: $TRAVIS_PYTHON_VERSION = 3.4
+    tags: true
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..bc22847
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,47 @@
+# Contributing
+
+Everyone that wants to contribute to the project should read this document.
+
+## Getting Started
+
+You may follow these steps if you wish to create a pull request. Fork the repo and clone it on your local machine. Then
+in the project's directory:
+
+```bash
+virtualenv env  # Create a virtualenv for the project's dependencies.
+source env/bin/activate  # Activate the virtualenv.
+pip install tox  # Install tox, which runs linting and tests.
+tox  # This runs all tests on your local machine. Make sure they pass.
+```
+
+If you don't have Python 2.6, 2.7, or 3.4 installed you can manually run tests on one specific version by running
+`tox -e lint,py35` (for Python 3.5) instead.
+
+## Updating Docs
+
+You don't need to but if you wish to update the [Sphinx](http://sphinx-doc.org/) documentation for this project you can
+get started by running these commands:
+
+```bash
+source env/bin/activate
+pip install tox
+tox -e docs
+open docs/_build/html/index.html  # Opens this file in your browser.
+```
+
+## Consistency and Style
+
+Keep code style consistent with the rest of the project. Some suggestions:
+
+1. **Write tests for your new features.** `if new_feature else` **Write tests for bug-causing scenarios.**
+2. Write docstrings for all classes, functions, methods, modules, etc.
+3. Document all function/method arguments and return values.
+4. Document all class variables instance variables.
+5. Documentation guidelines also apply to tests, though not as strict.
+6. Keep code style consistent, such as the kind of quotes to use and spacing.
+7. Don't use `except:` or `except Exception:` unless you have a `raise` in the block. Be specific about error handling.
+8. Don't use `isinstance()` (it breaks [duck typing](https://en.wikipedia.org/wiki/Duck_typing#In_Python)).
+
+## Thanks
+
+Thanks for fixing bugs or adding features to the project!
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..d314c3c
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Robpol86
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..fe9044f
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,162 @@
+==============
+terminaltables
+==============
+
+Easily draw tables in terminal/console applications from a list of lists of strings. Supports multi-line rows.
+
+* Python 2.6, 2.7, PyPy, PyPy3, 3.3, 3.4, and 3.5 supported on Linux and OS X.
+* Python 2.7, 3.3, 3.4, and 3.5 supported on Windows (both 32 and 64 bit versions of Python).
+
+📖 Full documentation: https://robpol86.github.io/terminaltables
+
+.. image:: https://img.shields.io/appveyor/ci/Robpol86/terminaltables/master.svg?style=flat-square&label=AppVeyor%20CI
+    :target: https://ci.appveyor.com/project/Robpol86/terminaltables
+    :alt: Build Status Windows
+
+.. image:: https://img.shields.io/travis/Robpol86/terminaltables/master.svg?style=flat-square&label=Travis%20CI
+    :target: https://travis-ci.org/Robpol86/terminaltables
+    :alt: Build Status
+
+.. image:: https://img.shields.io/codecov/c/github/Robpol86/terminaltables/master.svg?style=flat-square&label=Codecov
+    :target: https://codecov.io/gh/Robpol86/terminaltables
+    :alt: Coverage Status
+
+.. image:: https://img.shields.io/pypi/v/terminaltables.svg?style=flat-square&label=Latest
+    :target: https://pypi.python.org/pypi/terminaltables
+    :alt: Latest Version
+
+Quickstart
+==========
+
+Install:
+
+.. code:: bash
+
+    pip install terminaltables
+
+Usage:
+
+.. code::
+
+    from terminaltables import AsciiTable
+    table_data = [
+        ['Heading1', 'Heading2'],
+        ['row1 column1', 'row1 column2'],
+        ['row2 column1', 'row2 column2'],
+        ['row3 column1', 'row3 column2']
+    ]
+    table = AsciiTable(table_data)
+    print table.table
+    +--------------+--------------+
+    | Heading1     | Heading2     |
+    +--------------+--------------+
+    | row1 column1 | row1 column2 |
+    | row2 column1 | row2 column2 |
+    | row3 column1 | row3 column2 |
+    +--------------+--------------+
+
+Example Implementations
+=======================
+
+.. image:: docs/examples.png?raw=true
+   :alt: Example Scripts Screenshot
+
+Source code for examples: `example1.py <https://github.com/Robpol86/terminaltables/blob/master/example1.py>`_,
+`example2.py <https://github.com/Robpol86/terminaltables/blob/master/example2.py>`_, and
+`example3.py <https://github.com/Robpol86/terminaltables/blob/master/example3.py>`_
+
+.. changelog-section-start
+
+Changelog
+=========
+
+This project adheres to `Semantic Versioning <http://semver.org/>`_.
+
+3.1.0 - 2016-10-16
+------------------
+
+Added
+    * ``git --porcelain``-like table by liiight: https://github.com/Robpol86/terminaltables/pull/31
+
+3.0.0 - 2016-05-30
+------------------
+
+Added
+    * Support for https://pypi.python.org/pypi/colorama
+    * Support for https://pypi.python.org/pypi/termcolor
+    * Support for RTL characters (Arabic and Hebrew).
+    * Support for non-string items in ``table_data`` like integers.
+
+Changed
+    * Refactored again, but this time entire project including tests.
+
+Removed
+    * ``padded_table_data`` property and ``join_row()``. Moving away from repeated string joining/splitting.
+
+Fixed
+    * ``set_terminal_title()`` Unicode handling on Windows.
+    * https://github.com/Robpol86/terminaltables/issues/18
+    * https://github.com/Robpol86/terminaltables/issues/20
+    * https://github.com/Robpol86/terminaltables/issues/23
+    * https://github.com/Robpol86/terminaltables/issues/26
+
+2.1.0 - 2015-11-02
+------------------
+
+Added
+    * GitHub Flavored Markdown table by bcho: https://github.com/Robpol86/terminaltables/pull/12
+    * Python 3.5 support (Linux/OS X and Windows).
+
+2.0.0 - 2015-10-11
+------------------
+
+Changed
+    * Refactored code. No new features.
+    * Breaking changes: ``UnixTable``/``WindowsTable``/``WindowsTableDouble`` moved. Use ``SingleTable``/``DoubleTable``
+      instead.
+
+1.2.1 - 2015-09-03
+------------------
+
+Fixed
+    * CJK character width fixed by zqqf16 and bcho: https://github.com/Robpol86/terminaltables/pull/9
+
+1.2.0 - 2015-05-31
+------------------
+
+Added
+    * Bottom row separator.
+
+1.1.1 - 2014-11-03
+------------------
+
+Fixed
+    * Python 2.7 64-bit terminal width bug on Windows.
+
+1.1.0 - 2014-11-02
+------------------
+
+Added
+    * Windows support.
+    * Double-lined table.
+
+1.0.2 - 2014-09-18
+------------------
+
+Added
+    * ``table_width`` and ``ok`` properties.
+
+1.0.1 - 2014-09-12
+------------------
+
+Added
+    * Terminal width/height defaults for testing.
+    * ``terminaltables.DEFAULT_TERMINAL_WIDTH``
+    * ``terminaltables.DEFAULT_TERMINAL_HEIGHT``
+
+1.0.0 - 2014-09-11
+------------------
+
+* Initial release.
+
+.. changelog-section-end
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 0000000..5b0e517
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,33 @@
+# Configure.
+environment:
+  PYTHON: Python35
+  matrix:
+    - TOX_ENV: lint
+    - TOX_ENV: py35
+    - TOX_ENV: py34
+    - TOX_ENV: py33
+    - TOX_ENV: py27
+    - TOX_ENV: py
+      PYTHON: Python35-x64
+    - TOX_ENV: py
+      PYTHON: Python34-x64
+    - TOX_ENV: py
+      PYTHON: Python33-x64
+    - TOX_ENV: py
+      PYTHON: Python27-x64
+
+# Run.
+init: set PATH=C:\%PYTHON%;C:\%PYTHON%\Scripts;%PATH%
+install:
+  - appveyor DownloadFile https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-desktop.ps1
+  - ps: .\enable-desktop
+build_script: pip install tox
+test_script: tox -e %TOX_ENV%
+on_success: IF %TOX_ENV% NEQ lint pip install codecov & codecov
+
+# Post.
+# on_finish: https://github.com/Robpol86/terminaltables/issues/30
+  #- appveyor PushArtifact test_ascii_table.png https://github.com/Robpol86/terminaltables/issues/30
+  #- appveyor PushArtifact test_double_table.png https://github.com/Robpol86/terminaltables/issues/30
+  #- appveyor PushArtifact test_single_table.png https://github.com/Robpol86/terminaltables/issues/30
+  #- appveyor PushArtifact test_terminal_io.png https://github.com/Robpol86/terminaltables/issues/30
diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html
new file mode 100644
index 0000000..f78ddc4
--- /dev/null
+++ b/docs/_templates/layout.html
@@ -0,0 +1,6 @@
+{# From https://github.com/snide/sphinx_rtd_theme/issues/166 #}
+
+{# Import the theme's layout. #}
+{% extends "!layout.html" %}
+
+{% set css_files = css_files + ['_static/pygments.css'] %}
diff --git a/docs/asciitable.png b/docs/asciitable.png
new file mode 100644
index 0000000..97ae271
Binary files /dev/null and b/docs/asciitable.png differ
diff --git a/docs/asciitable.rst b/docs/asciitable.rst
new file mode 100644
index 0000000..d5120f3
--- /dev/null
+++ b/docs/asciitable.rst
@@ -0,0 +1,16 @@
+.. _asciitable:
+
+==========
+AsciiTable
+==========
+
+AsciiTable is the simplest table. It uses ``+``, ``|``, and ``-`` characters to build the borders.
+
+.. image:: asciitable.png
+    :target: _images/asciitable.png
+
+API
+===
+
+.. autoclass:: terminaltables.AsciiTable
+    :members: column_max_width, column_widths, ok, table_width, table
diff --git a/docs/changelog.rst b/docs/changelog.rst
new file mode 100644
index 0000000..0b9ff7b
--- /dev/null
+++ b/docs/changelog.rst
@@ -0,0 +1,5 @@
+.. _changelog:
+
+.. include:: ../README.rst
+    :start-after: changelog-section-start
+    :end-before: changelog-section-end
diff --git a/docs/conf.py b/docs/conf.py
new file mode 100644
index 0000000..fb33f09
--- /dev/null
+++ b/docs/conf.py
@@ -0,0 +1,53 @@
+"""Sphinx configuration file."""
+
+import os
+import sys
+import time
+
+
+# General configuration.
+sys.path.append(os.path.realpath(os.path.join(os.path.dirname(__file__), '..')))
+author = '@Robpol86'
+copyright = '{}, {}'.format(time.strftime('%Y'), author)
+master_doc = 'index'
+project = __import__('setup').NAME
+pygments_style = 'friendly'
+release = version = __import__('setup').VERSION
+templates_path = ['_templates']
+extensions = list()
+
+
+# Options for HTML output.
+html_context = dict(
+    conf_py_path='/docs/',
+    display_github=True,
+    github_repo=os.environ.get('TRAVIS_REPO_SLUG', '/' + project).split('/', 1)[1],
+    github_user=os.environ.get('TRAVIS_REPO_SLUG', 'robpol86/').split('/', 1)[0],
+    github_version=os.environ.get('TRAVIS_BRANCH', 'master'),
+    source_suffix='.rst',
+)
+html_copy_source = False
+html_favicon = 'favicon.ico'
+html_theme = 'sphinx_rtd_theme'
+html_title = project
+
+
+# autodoc
+extensions.append('sphinx.ext.autodoc')
+
+
+# extlinks.
+extensions.append('sphinx.ext.extlinks')
+extlinks = {'github': ('https://github.com/robpol86/{0}/blob/v{1}/%s'.format(project, version), '')}
+
+
+# google analytics
+extensions.append('sphinxcontrib.googleanalytics')
+googleanalytics_id = 'UA-82627369-1'
+
+
+# SCVersioning.
+scv_banner_greatest_tag = True
+scv_grm_exclude = ('.gitignore', '.nojekyll', 'README.rst')
+scv_show_banner = True
+scv_sort = ('semver', 'time')
diff --git a/docs/doubletable.png b/docs/doubletable.png
new file mode 100644
index 0000000..ce532a1
Binary files /dev/null and b/docs/doubletable.png differ
diff --git a/docs/doubletable.rst b/docs/doubletable.rst
new file mode 100644
index 0000000..da322ab
--- /dev/null
+++ b/docs/doubletable.rst
@@ -0,0 +1,33 @@
+.. _doubletable:
+
+===========
+DoubleTable
+===========
+
+DoubleTable uses `box drawing characters`_ for table borders. On Windows terminaltables uses `code page 437`_
+characters. However there is no equivalent character set for POSIX (Linux/OS X). Python automatically converts CP437
+double-line box characters to Unicode and displays that instead.
+
+.. image:: doubletable.png
+    :target: _images/doubletable.png
+
+Gaps on Windows 10
+==================
+
+Like SingleTable the console on Windows 10 changed the default font face to ``Consolas``. This new font seems to show
+gaps between lines. Switching the font back to ``Lucida Console`` eliminates the gaps.
+
+Gaps on POSIX
+=============
+
+There is no easy trick for POSIX like there is on Windows. I can't seem to find out how to force terminals to eliminate
+gaps vertically between Unicode characters.
+
+API
+===
+
+.. autoclass:: terminaltables.DoubleTable
+    :members: column_max_width, column_widths, ok, table_width, table
+
+.. _box drawing characters: https://en.wikipedia.org/wiki/Box-drawing_character
+.. _code page 437: https://en.wikipedia.org/wiki/Code_page_437
diff --git a/docs/examples.png b/docs/examples.png
new file mode 100644
index 0000000..62a623c
Binary files /dev/null and b/docs/examples.png differ
diff --git a/docs/favicon.ico b/docs/favicon.ico
new file mode 100644
index 0000000..8cf8947
Binary files /dev/null and b/docs/favicon.ico differ
diff --git a/docs/githubtable.png b/docs/githubtable.png
new file mode 100644
index 0000000..0b2a6a3
Binary files /dev/null and b/docs/githubtable.png differ
diff --git a/docs/githubtable.rst b/docs/githubtable.rst
new file mode 100644
index 0000000..ba53218
--- /dev/null
+++ b/docs/githubtable.rst
@@ -0,0 +1,27 @@
+.. _githubtable:
+
+===========================
+GithubFlavoredMarkdownTable
+===========================
+
+GithubFlavoredMarkdownTable was initially implemented bcho_. It produces a `GitHub Flavored Markdown`_ formatted table.
+
+Because there are no outer table borders:
+
+* Table titles are ignored.
+* Border display toggles are also ignored.
+
+.. image:: githubtable.png
+    :target: _images/githubtable.png
+
+.. image:: githubtable_rendered.png
+    :target: _images/githubtable_rendered.png
+
+API
+===
+
+.. autoclass:: terminaltables.GithubFlavoredMarkdownTable
+    :members: column_max_width, column_widths, ok, table_width, table
+
+.. _bcho: https://github.com/Robpol86/terminaltables/pull/12
+.. _GitHub Flavored Markdown: https://help.github.com/categories/writing-on-github
diff --git a/docs/githubtable_rendered.png b/docs/githubtable_rendered.png
new file mode 100644
index 0000000..319bbcb
Binary files /dev/null and b/docs/githubtable_rendered.png differ
diff --git a/docs/index.rst b/docs/index.rst
new file mode 100644
index 0000000..002ca17
--- /dev/null
+++ b/docs/index.rst
@@ -0,0 +1,77 @@
+========================
+terminaltables |version|
+========================
+
+Easily draw tables in terminal/console applications from a list of lists of strings. As easy as:
+
+.. code-block:: pycon
+
+    >>> from terminaltables import AsciiTable
+    >>> table_data = [
+    ... ['Heading1', 'Heading2'],
+    ... ['row1 column1', 'row1 column2'],
+    ... ['row2 column1', 'row2 column2'],
+    ... ['row3 column1', 'row3 column2'],
+    ... ]
+    >>> table = AsciiTable(table_data)
+    >>> print table.table
+    +--------------+--------------+
+    | Heading1     | Heading2     |
+    +--------------+--------------+
+    | row1 column1 | row1 column2 |
+    | row2 column1 | row2 column2 |
+    | row3 column1 | row3 column2 |
+    +--------------+--------------+
+
+.. figure:: examples.png
+    :target: _images/examples.png
+
+    Windows 10, Windows XP, and OS X are also supported. View source: :github:`example1.py`, :github:`example2.py`,
+    :github:`example3.py`
+
+Features
+========
+
+* Multi-line rows: add newlines to table cells and terminatables will handle the rest.
+* Table titles: show a title embedded in the top border of the table.
+* POSIX: Python 2.6, 2.7, PyPy, PyPy3, 3.3, 3.4, and 3.5 supported on Linux and OS X.
+* Windows: Python 2.7, 3.3, 3.4, and 3.5 supported on Windows XP through 10.
+* CJK: Wide Chinese/Japanese/Korean characters displayed correctly.
+* RTL: Arabic and Hebrew characters aligned correctly.
+* Alignment/Justification: Align individual columns left, center, or right.
+* Colored text: colorclass_, colorama_, termcolor_, or just plain `ANSI escape codes`_.
+
+Project Links
+=============
+
+* Documentation: https://robpol86.github.io/terminaltables
+* Source code: https://github.com/Robpol86/terminaltables
+* PyPI homepage: https://pypi.python.org/pypi/terminaltables
+
+.. toctree::
+    :maxdepth: 2
+    :caption: General
+
+    install
+    quickstart
+    settings
+
+.. toctree::
+    :maxdepth: 2
+    :caption: Table Styles
+
+    asciitable
+    singletable
+    doubletable
+    githubtable
+
+.. toctree::
+    :maxdepth: 1
+    :caption: Appendix
+
+    changelog
+
+.. _colorclass: https://github.com/Robpol86/colorclass
+.. _colorama: https://github.com/tartley/colorama
+.. _termcolor: https://pypi.python.org/pypi/termcolor
+.. _ANSI escape codes: http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html
diff --git a/docs/install.rst b/docs/install.rst
new file mode 100644
index 0000000..ea0bfae
--- /dev/null
+++ b/docs/install.rst
@@ -0,0 +1,38 @@
+.. _install:
+
+============
+Installation
+============
+
+Getting started is pretty simple. The first step is to install the library.
+
+Pip Install
+===========
+
+The easiest way to get terminaltables is to use `pip <https://pip.pypa.io>`_. Simply run this command.
+
+.. code-block:: bash
+
+    pip install terminaltables
+
+Latest from GitHub
+==================
+
+You can also elect to install the latest bleeding-edge version by using pip to install directly from the GitHub
+repository.
+
+.. code-block:: bash
+
+    pip install git+https://github.com/Robpol86/terminaltables.git
+
+Clone and Install
+=================
+
+Lastly you can also just clone the repo and install from it. Usually you only need to do this if you plan on
+`contributing <https://github.com/Robpol86/terminaltables/blob/master/CONTRIBUTING.md>`_ to the project.
+
+.. code-block:: bash
+
+    git clone https://github.com/Robpol86/terminaltables.git
+    cd terminaltables
+    python setup.py install
diff --git a/docs/key.enc b/docs/key.enc
new file mode 100644
index 0000000..f485db2
Binary files /dev/null and b/docs/key.enc differ
diff --git a/docs/quickstart.rst b/docs/quickstart.rst
new file mode 100644
index 0000000..83e9ee8
--- /dev/null
+++ b/docs/quickstart.rst
@@ -0,0 +1,110 @@
+.. _quickstart:
+
+==========
+Quickstart
+==========
+
+This section will go over the basics of terminaltables.
+
+Make sure that you've already :ref:`installed <install>` it.
+
+Table with Default Settings
+===========================
+
+Let's begin by importing AsciiTable, which just uses ``+``, ``-``, and ``|`` characters.
+
+.. code-block:: pycon
+
+    >>> from terminaltables import AsciiTable
+
+Now let's define the table data in a variable called ``data``. We'll do it the long way by creating an empty list
+representing the entire table. Then we'll add rows one by one. Each row is a list representing table cells.
+
+.. code-block:: pycon
+
+    >>> data = []
+    >>> data.append(['Row one column one', 'Row one column two'])
+    >>> data.append(['Row two column one', 'Row two column two'])
+    >>> data.append(['Row three column one', 'Row three column two'])
+
+Next we can use AsciiTable to format the table properly and then we can just print it. ``table.table`` gives you just
+one long string with newline characters so you can easily print it.
+
+.. code-block:: pycon
+
+    >>> table = AsciiTable(data)
+    >>> print table.table
+    +----------------------+----------------------+
+    | Row one column one   | Row one column two   |
+    +----------------------+----------------------+
+    | Row two column one   | Row two column two   |
+    | Row three column one | Row three column two |
+    +----------------------+----------------------+
+
+By default the first row of the table is considered the heading. This can be turned off.
+
+Changing Table Settings
+=======================
+
+There are more options available to change how your tables are formatted. Say your table doesn't really have a heading
+row; all rows are just data.
+
+.. code-block:: pycon
+
+    >>> table.inner_heading_row_border = False
+    >>> print table.table
+    +----------------------+----------------------+
+    | Row one column one   | Row one column two   |
+    | Row two column one   | Row two column two   |
+    | Row three column one | Row three column two |
+    +----------------------+----------------------+
+
+Now you want to add a title to the table:
+
+.. code-block:: pycon
+
+    >>> table.title = 'My Table'
+    >>> print table.table
+    +My Table--------------+----------------------+
+    | Row one column one   | Row one column two   |
+    | Row two column one   | Row two column two   |
+    | Row three column one | Row three column two |
+    +----------------------+----------------------+
+
+Maybe you want lines in between all rows:
+
+.. code-block:: pycon
+
+    >>> table.inner_row_border = True
+    >>> print table.table
+    +My Table--------------+----------------------+
+    | Row one column one   | Row one column two   |
+    +----------------------+----------------------+
+    | Row two column one   | Row two column two   |
+    +----------------------+----------------------+
+    | Row three column one | Row three column two |
+    +----------------------+----------------------+
+
+There are many more settings available. You can find out more by reading the :ref:`settings` section. Each table style
+pretty much shares the same settings but there are a few minor exceptions. Refer to each table style's documentation on
+the sidebar.
+
+Other Table Styles
+==================
+
+Terminaltables comes with a few other table styles than just ``AsciiTable``. All table styles more or less have the same
+API.
+
+.. code-block:: pycon
+
+    >>> from terminaltables import SingleTable
+    >>> table = SingleTable(data)
+    >>> print table.table
+    ┌──────────────────────┬──────────────────────┐
+    │ Row one column one   │ Row one column two   │
+    ├──────────────────────┼──────────────────────┤
+    │ Row two column one   │ Row two column two   │
+    │ Row three column one │ Row three column two │
+    └──────────────────────┴──────────────────────┘
+
+You can find documentation for all table styles on the sidebar.
diff --git a/docs/settings.rst b/docs/settings.rst
new file mode 100644
index 0000000..c609d1f
--- /dev/null
+++ b/docs/settings.rst
@@ -0,0 +1,79 @@
+.. _settings:
+
+========
+Settings
+========
+
+All tables (except :ref:`githubtable`) have the same settings to change the way the table is displayed. These attributes
+are available after instantiation.
+
+.. py:attribute:: Table.table_data
+
+    The actual table data to render. This must be a list (or tuple) of lists of strings. The outer list holds the rows
+    and the inner lists holds the cells (aka columns in that row).
+
+    Example:
+
... 4937 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/terminaltables.git



More information about the Python-modules-commits mailing list