chore: simplify
This commit is contained in:
parent
45169e54eb
commit
4e778a2cd2
1 changed files with 6 additions and 1 deletions
|
|
@ -15,4 +15,9 @@ render: |
|
|||
forecast:
|
||||
source: http
|
||||
uri: https://api.allinpower.nl/troodon/api/p/spot_market/prices/?product_type=ELK
|
||||
jq: '[.timestamps, .prices] | transpose | map({ "start": (.[0] | strptime("%Y-%m-%dT%H:%M:%S.%f%z") | strftime("%Y-%m-%dT%H:%M:%SZ")), "end": (.[0] | strptime("%Y-%m-%dT%H:%M:%S.%f%z") | mktime + 3600 | strftime("%Y-%m-%dT%H:%M:%SZ")), "price": .[1] }) | tostring'
|
||||
jq: |
|
||||
[.timestamps, .prices] | transpose | map({
|
||||
"start": (.[0] | strptime("%FT%T.%f%z") | strftime("%FT%TZ")),
|
||||
"end": (.[0] | strptime("%FT%T.%f%z") | mktime + 3600 | strftime("%FT%TZ")),
|
||||
"price": .[1]
|
||||
}) | tostring'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue