summaryrefslogtreecommitdiffstats
path: root/dead_code
diff options
context:
space:
mode:
Diffstat (limited to 'dead_code')
-rw-r--r--dead_code/.travis.yml49
-rw-r--r--dead_code/README.rst162
-rw-r--r--dead_code/appveyor.yml27
-rw-r--r--dead_code/setup.py109
4 files changed, 347 insertions, 0 deletions
diff --git a/dead_code/.travis.yml b/dead_code/.travis.yml
new file mode 100644
index 0000000..02cf421
--- /dev/null
+++ b/dead_code/.travis.yml
@@ -0,0 +1,49 @@
+# Configure.
+language: python
+python:
+ - 3.5
+ - 3.4
+ - 3.3
+ - pypy3
+ - pypy
+ - 2.7
+ - 2.6
+sudo: false
+
+# Environment and matrix.
+env: TOX_ENV=py
+matrix:
+ include:
+ - python: 3.5
+ env: TOX_ENV=lint
+ after_success: []
+ - python: 3.5
+ env: TOX_ENV=docs
+ after_success:
+ - eval "$(ssh-agent -s)"; touch docs/key; chmod 0600 $_
+ - openssl aes-256-cbc -d -K "$encrypted_c89fed6a587d_key" -iv "$encrypted_c89fed6a587d_iv" -out docs/key
+ < docs/key.enc && ssh-add $_
+ - git config --global user.email "builds@travis-ci.com"
+ - git config --global user.name "Travis CI"
+ - git remote set-url --push origin "git@github.com:$TRAVIS_REPO_SLUG"
+ - export ${!TRAVIS*}
+ - tox -e docsV
+
+# 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/dead_code/README.rst b/dead_code/README.rst
new file mode 100644
index 0000000..fe9044f
--- /dev/null
+++ b/dead_code/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/dead_code/appveyor.yml b/dead_code/appveyor.yml
new file mode 100644
index 0000000..8b7d1c9
--- /dev/null
+++ b/dead_code/appveyor.yml
@@ -0,0 +1,27 @@
+# Configure.
+environment:
+ PATH: C:\%PYTHON%;C:\%PYTHON%\Scripts;%PATH%
+ 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.
+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:
+ - FOR %%F IN (test*.png) DO appveyor PushArtifact %%F
diff --git a/dead_code/setup.py b/dead_code/setup.py
new file mode 100644
index 0000000..a947444
--- /dev/null
+++ b/dead_code/setup.py
@@ -0,0 +1,109 @@
+#!/usr/bin/env python
+"""Setup script for the project."""
+
+import codecs
+import os
+import re
+
+from setuptools import Command, setup
+
+INSTALL_REQUIRES = []
+LICENSE = 'MIT'
+NAME = IMPORT = 'terminaltables'
+VERSION = '3.1.0'
+
+
+def readme(path='README.rst'):
+ """Try to read README.rst or return empty string if failed.
+
+ :param str path: Path to README file.
+
+ :return: File contents.
+ :rtype: str
+ """
+ path = os.path.realpath(os.path.join(os.path.dirname(__file__), path))
+ handle = None
+ url_prefix = 'https://raw.githubusercontent.com/Robpol86/{name}/v{version}/'.format(name=NAME, version=VERSION)
+ try:
+ handle = codecs.open(path, encoding='utf-8')
+ return handle.read(131072).replace('.. image:: docs', '.. image:: {0}docs'.format(url_prefix))
+ except IOError:
+ return ''
+ finally:
+ getattr(handle, 'close', lambda: None)()
+
+
+class CheckVersion(Command):
+ """Make sure version strings and other metadata match here, in module/package, tox, and other places."""
+
+ description = 'verify consistent version/etc strings in project'
+ user_options = []
+
+ @classmethod
+ def initialize_options(cls):
+ """Required by distutils."""
+ pass
+
+ @classmethod
+ def finalize_options(cls):
+ """Required by distutils."""
+ pass
+
+ @classmethod
+ def run(cls):
+ """Check variables."""
+ project = __import__(IMPORT, fromlist=[''])
+ for expected, var in [('@Robpol86', '__author__'), (LICENSE, '__license__'), (VERSION, '__version__')]:
+ if getattr(project, var) != expected:
+ raise SystemExit('Mismatch: {0}'.format(var))
+ # Check changelog.
+ if not re.compile(r'^%s - \d{4}-\d{2}-\d{2}[\r\n]' % VERSION, re.MULTILINE).search(readme()):
+ raise SystemExit('Version not found in readme/changelog file.')
+ # Check tox.
+ if INSTALL_REQUIRES:
+ contents = readme('tox.ini')
+ section = re.compile(r'[\r\n]+install_requires =[\r\n]+(.+?)[\r\n]+\w', re.DOTALL).findall(contents)
+ if not section:
+ raise SystemExit('Missing install_requires section in tox.ini.')
+ in_tox = re.findall(r' ([^=]+)==[\w\d.-]+', section[0])
+ if INSTALL_REQUIRES != in_tox:
+ raise SystemExit('Missing/unordered pinned dependencies in tox.ini.')
+
+
+if __name__ == '__main__':
+ setup(
+ author='@Robpol86',
+ author_email='robpol86@gmail.com',
+ classifiers=[
+ 'Development Status :: 5 - Production/Stable',
+ 'Environment :: Console',
+ 'Environment :: MacOS X',
+ 'Environment :: Win32 (MS Windows)',
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: MIT License',
+ 'Operating System :: MacOS :: MacOS X',
+ 'Operating System :: Microsoft :: Windows',
+ 'Operating System :: POSIX :: Linux',
+ 'Operating System :: POSIX',
+ 'Programming Language :: Python :: 2.6',
+ 'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: 3.3',
+ 'Programming Language :: Python :: 3.4',
+ 'Programming Language :: Python :: 3.5',
+ 'Programming Language :: Python :: Implementation :: PyPy',
+ 'Topic :: Software Development :: Libraries',
+ 'Topic :: Terminals',
+ 'Topic :: Text Processing :: Markup',
+ ],
+ cmdclass=dict(check_version=CheckVersion),
+ description='Generate simple tables in terminals from a nested list of strings.',
+ install_requires=INSTALL_REQUIRES,
+ keywords='Shell Bash ANSI ASCII terminal tables',
+ license=LICENSE,
+ long_description=readme(),
+ name=NAME,
+ packages=[IMPORT],
+ url='https://github.com/Robpol86/' + NAME,
+ version=VERSION,
+ zip_safe=True,
+ )