Metadata-Version: 2.1
Name: dynamictableprint
Version: 1.0.1
Summary: Wrapper around TablePrint to adjust columns to the window size
Home-page: https://github.com/DerekYu177/dynamictableprint
Author: Derek Yu
Author-email: derek-nis@hotmail.com
License: UNKNOWN
Project-URL: Bug Reports, https://github.com/DerekYu177/dynamictableprint/issues
Project-URL: Source, https://github.com/DerekYu177/dynamictableprint/
Keywords: table print display dynamic
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Natural Language :: English
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Text Processing :: General
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Description-Content-Type: text/markdown
Provides-Extra: dev
Provides-Extra: test
Requires-Dist: tableprint
Provides-Extra: dev
Requires-Dist: pandas; extra == 'dev'
Provides-Extra: test
Requires-Dist: unittest; extra == 'test'
Requires-Dist: pytest; extra == 'test'

## About
This python3 module aims to add additional functionality to the already amazing
TablePrint (github.com/nirum/tableprint).

While TablePrint is functionally excellent at printing out text to
the console in a beautiful manner, I have found that it lacks some dynamicism.
When printing to a console that is constantly different sizes for example,
wrapping the text around produces basically illegible tables.

This module aims to improve the situation where the user is doing data heavy
string representation, using data processing packages such as Pandas (which,
this module only supports, and also, _thank you_ to nirum for adding in Pandas
DataFrame support). Based on the size of the console, and some priorities to
each column given by the user, we will squish columns as needed until it fits
nicely within the given constraints. When the console width changes, the
program will need to be reloaded, but will adjust to fit the new screen.

## Installation
You'll have to clone directly from github into your source repo for now.
Looking into improving this!

## Usage
```py
from dynamictableprint import DynamicTablePrint
import pandas as pd

d = {
    'names': [
        "Albert Einstein",
        "Issac Newton",
        "Stephen Hawkings"
    ],
    'places': [
        "Ulm, Germany",
        "Wolsthorpe Manor, United Kingdom",
        "Oxford, United Kingdom"
    ],
    'Foods': [
        "Spaghetti",
        "Pasta",
        "Noodles"
    ]
}
data_frame = pd.DataFrame(data=d)

dtp = DynamicTablePrint(data_frame, angel_column='Foods', squish_column='places')
dtp.banner('Things!')
dtp.
dtp.write_to_screen()
```

The `squish_column` represents the column that you would like to be squished
first. Typically the 'squish factor' is 20% at most, but will dynamically vary
depending on how the other columns are. The `angel_column` is the column that
you would prefer to be modified last, that is, having the highest priority on
being the same.

## Dependencies
`python3.6`, an possibly other versions `>3.0`
`tableprint`
`pandas`

## License
`MIT`


