Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/perbu/powercost
https://github.com/perbu/powercost
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/perbu/powercost
- Owner: perbu
- License: mit
- Created: 2022-11-08T19:49:22.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-07T07:58:33.000Z (about 2 months ago)
- Last Synced: 2024-12-07T08:19:23.413Z (about 2 months ago)
- Language: Go
- Size: 3.56 MB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# powercost
Silly little cli to query an API with electricity prices for Norway.
## Building
There are pre-build binaries for most architectures in the release sections.To build from source, you need to have go installed. Then run:
```bash
go build -o pwrcost main.go
```
Move the `pwrcost` binary to a directory in your PATH.
## Usage```
$ pwrcost0.45 ┤ ╭─╮
0.41 ┤ ╭╯ ╰─╮
0.37 ┤ ╭─╯ ╰────╮
0.34 ┤ ╭╯ ╰───────────╮
0.30 ┼─╮ ╭─╯ ╰────────╮
0.26 ┤ ╰────────╮ ╭──╯ ╰─╮
0.22 ┤ ╰───╯ ╰─╮
0.19 ┤ ╰───╮
0.15 ┤ ╰────╮
0.11 ┤ ╰──╮
0.08 ┤ ╰─
Prices for 2022-11-10 in NO1
00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
```You can add the flag "-tomorrow" and it'll try to give you the prices for tomorrow. If the prices
are not published yet, it will print an error message to stderr.
```bash
pwrcost -tomorrow
```
You can also add the flag "-zone" to display a different price zone.
```bash
pwrcost -zone=NO2
```See also `pwrcost -h` for more usage information.
## Todo
- Highlight the price for the current hour
- Tests
- Probably lots. This is a quick hack.## License
See LICENSE.md