From 6d5fa15604842afbc5757a92e093f1c5383e1301 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Fri, 24 Dec 2021 00:47:55 +0400 Subject: [PATCH] Updated README. --- README.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9f4b5cc..320171c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,34 @@ # kwh-calc -Calculate cost of electricity. \ No newline at end of file +Calculate cost of electricity. + +## How to use + +```shell +$ kwh-calc [OPTIONS] price wattage interval [interval ..] +``` + +Options are -v, --version to show program's version; and -h, --help to show usage of a program. + +`price` is a price per KWh. `wattage` is how many Watts being consumed. `interval` is for how long. + +`interval` is in seconds, but you can specify a unit. Units are the following: +`m` for minutes; `h` for hours; and `d` for days. There could be as many `interval`s passed as you need. + +Here is an example: + +```shell +$ kwh-calc 3.68 120 30d 2h +``` + +P.S.: Yeah, I pay 3.68 rubles per KWh. Which is just $0.05. :) + +## Installation + +### Manually + +First run `make` to build a program, and then `make install` to copy executable in `/usr/bin/`. Later, use `make uninstall` to delete it, or just delete `/usr/bin/kwh-calc`. + +### For ArchLinux + +You can take a [PKGBUILD](/raw/branch/master/PKGBUILD) file and in a directory with it run `pkgbuild -i`. \ No newline at end of file