Skip to main content

ScreenCalc is a Python 3 package template.

Project description

ScreenCalc

A simple screen size calculator to convert screen measurement units at various
densities
Build Status
Coverage Status
PyPI Version
PyPI Downloads

Getting Started

Install:

$ pip install ScreenCalc

Use it:

$ sc 100px@hdpi 100dp ...
100.0px@240dpi
+-----------+---------+----------+---------+---------+----------+------+
| density   |      dp |       px |      sp |      mm |       in |   pt |
|-----------+---------+----------+---------+---------+----------+------|
| ldpi      | 66.6667 |  50      | 66.6667 | 10.5833 | 0.416667 |   30 |
| mdpi      | 66.6667 |  66.6667 | 66.6667 | 10.5833 | 0.416667 |   30 |
| tvdpi     | 66.6667 |  88.75   | 66.6667 | 10.5833 | 0.416667 |   30 |
| hdpi      | 66.6667 | 100      | 66.6667 | 10.5833 | 0.416667 |   30 |
| xhdpi     | 66.6667 | 133.333  | 66.6667 | 10.5833 | 0.416667 |   30 |
| xxhdpi    | 66.6667 | 200      | 66.6667 | 10.5833 | 0.416667 |   30 |
| xxxhdpi   | 66.6667 | 266.667  | 66.6667 | 10.5833 | 0.416667 |   30 |
+-----------+---------+----------+---------+---------+----------+------+

...
Known measurement units are: dp, px, sp, mm, in, and pt. Screen
density can be one of the named values (ldpi, mdpi, tvdpi, hdpi,
xhdpi, xxhdpi, or xxxhdpi), or a decimal value (e.g. 100).

Changelog

0.1.0 (2015/04/10)

  • Fix pt unit conversions

  • Add unit tests

0.0.1 (2015/04/09)

  • Initial (mostly) functional release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ScreenCalc-0.1.0.tar.gz (6.4 kB view hashes)

Uploaded Source

Built Distribution

ScreenCalc-0.1.0-py2-none-any.whl (8.3 kB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page