customizable converter tool to convert <source> to <target>
Project description
converterpy
converterpy is designed as a customizable conversion tool to convert one thing to another.
Usage
Usage:
convert <value> <source> to <target> [-v|--verbose]
convert <source> to <target> <value> [-v|--verbose]
convert list [<source>] [-v|--verbose]
convert --version
Options:
-h --help Show usage.
-v --verbose Enable verbose mode for debugging.
--version Show version.
Examples
$ convert 3600 seconds to minutes -> '60'
$ convert 3600 sec to min -> '60'
$ convert 2500 g to kg -> '2.5'
$ convert 1610744400 ts to date -> '2021-01-16 00:00:00'
$ convert 100 centimeter to meter -> '1'
Features
There are some built-in converters to use;
- SITimeConverter (converts the following units: seconds, minutes, hours)
- SILengthConverter (converts the following units: millimeter, centimeter, meter, kilometer)
- SIMassConverter (converts the following units: milligram, gram, kilogram)
- TimestampDateConverter (converts unix timestamp to date, date to timestamp format)
Installation
converterpy
requires Python 3.5+ to run.
Install with pip
$ pip install converterpy
Custom Converters
Please follow the instructions in custom converter documentation.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
converterpy-1.0.0.tar.gz
(9.6 kB
view hashes)
Built Distribution
Close
Hashes for converterpy-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3effeb69342d033ed96d021593e7c9302e1f965e3374f503fdda50875aa9db4c |
|
MD5 | b0f85d6866c90a21996bf3f9d4864914 |
|
BLAKE2b-256 | 6a069c479cef2ae11894cf7575c64b3c788df40a8e0d41d2a89fd4ec11a6eee0 |