Calculates cost of electricity.
Go to file
Alexander Andreev 24d19fa6ee
Added newlines at the end of source files to be compatible with clang.
2021-12-24 01:01:43 +04:00
src Added newlines at the end of source files to be compatible with clang. 2021-12-24 01:01:43 +04:00
.gitignore [.gitignore] reduced. 2021-12-23 23:58:14 +04:00
LICENSE LICENSE update. 2021-12-23 23:57:35 +04:00
Makefile Removed CC, since it is default anyway. 2021-12-24 01:01:13 +04:00
PKGBUILD Last fix for PKGBUILD. 2021-12-24 00:26:18 +04:00
README.md Am I retarded? I am retarded... :) Fixed makepkg -i command in README.md. 2021-12-24 00:57:01 +04:00

README.md

kwh-calc

Calculate cost of electricity.

How to use

$ 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 intervals passed as you need.

Here is an example:

$ 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 file and in a directory with it run makepkg -i.