Metadata-Version: 2.1
Name: whratio
Version: 3.1.0
Summary: Calculate integer and decimal aspect ratio for dimensions.
Home-page: https://github.com/mirukan/whratio
Author: miruka
Author-email: miruka@disroot.org
License: LGPLv3
Keywords: calculate aspect ratio dimension width height image video
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: Environment :: Console
Classifier: Topic :: Utilities
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Natural Language :: English
Classifier: Operating System :: POSIX
Requires-Python: >=3.5, <4
Description-Content-Type: text/markdown
Requires-Dist: docopt
Requires-Dist: blessings

# whratio

[![PyPI downloads](http://pepy.tech/badge/whratio)](https://pepy.tech/project/whratio)
[![PyPI version](https://img.shields.io/pypi/v/whratio.svg)](https://pypi.python.org/pypi/whratio)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/whratio.svg)](https://pypi.python.org/pypi/whratio)

Calculate integer and decimal aspect ratio for dimensions.

## CLI examples

```sh
    $ whratio 1024 768
    4 3 1.3333333333333333
```

```sh
    $ whratio -d -n 2 256 196
    1.31
```

```sh
    whratio -WH 2560 1080 | tr " " :
    64:27
```

## Python package examples

```python3
    >>> import whratio

    >>> whratio.as_int(1920, 1080)
    (16, 9)

    >>> whratio.as_float(1920, 1080)
    1.7777777777777777

    >>> round(whratio.as_float(1920, 1080), 2)
    1.78
```

## Installation

Using [pip](https://pip.pypa.io/en/stable/installing/):

```sh
    # pip3 install whratio
```


