{"id":15008957,"url":"https://github.com/mirukana/whratio","last_synced_at":"2026-04-11T05:02:51.481Z","repository":{"id":62588917,"uuid":"128108535","full_name":"mirukana/whratio","owner":"mirukana","description":"Calculate integer and decimal aspect ratio for dimensions","archived":false,"fork":false,"pushed_at":"2018-11-20T02:10:25.000Z","size":40,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-04T14:18:17.467Z","etag":null,"topics":["aspect-ratio","calculator","cli","dimensions","height","image","python","python-2","python-3","python-module","video","width"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mirukana.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-04T19:06:15.000Z","updated_at":"2022-05-13T13:42:06.000Z","dependencies_parsed_at":"2022-11-03T17:54:17.649Z","dependency_job_id":null,"html_url":"https://github.com/mirukana/whratio","commit_stats":null,"previous_names":["mirukan/whratio"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mirukana/whratio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirukana%2Fwhratio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirukana%2Fwhratio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirukana%2Fwhratio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirukana%2Fwhratio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mirukana","download_url":"https://codeload.github.com/mirukana/whratio/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirukana%2Fwhratio/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31669117,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T17:19:37.612Z","status":"online","status_checked_at":"2026-04-11T02:00:05.776Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aspect-ratio","calculator","cli","dimensions","height","image","python","python-2","python-3","python-module","video","width"],"created_at":"2024-09-24T19:22:00.468Z","updated_at":"2026-04-11T05:02:51.447Z","avatar_url":"https://github.com/mirukana.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# whratio\n\n[![PyPI downloads](http://pepy.tech/badge/whratio)](https://pepy.tech/project/whratio)\n[![PyPI version](https://img.shields.io/pypi/v/whratio.svg)](https://pypi.python.org/pypi/whratio)\n[![PyPI pyversions](https://img.shields.io/pypi/pyversions/whratio.svg)](https://pypi.python.org/pypi/whratio)\n\nCalculate integer and decimal aspect ratio for dimensions.\n\n## CLI examples\n\n```sh\n    $ whratio 1024 768\n    4 3 1.3333333333333333\n```\n\n```sh\n    $ whratio -d -n 2 256 196\n    1.31\n```\n\n```sh\n    whratio -WH 2560 1080 | tr \" \" :\n    64:27\n```\n\n## Python package examples\n\n```python3\n    \u003e\u003e\u003e import whratio\n\n    \u003e\u003e\u003e whratio.as_int(1920, 1080)\n    (16, 9)\n\n    \u003e\u003e\u003e whratio.as_float(1920, 1080)\n    1.7777777777777777\n\n    \u003e\u003e\u003e round(whratio.as_float(1920, 1080), 2)\n    1.78\n```\n\n## Installation\n\nUsing [pip](https://pip.pypa.io/en/stable/installing/):\n\n```sh\n    # pip3 install whratio\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmirukana%2Fwhratio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmirukana%2Fwhratio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmirukana%2Fwhratio/lists"}