From a951ebc299ac2830f798adaa2460a951078fb1b2 Mon Sep 17 00:00:00 2001 From: grizzly Date: Mon, 25 Aug 2025 21:55:08 -0400 Subject: [PATCH] more detailed line for time of day --- document.typ | 2 +- update.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/document.typ b/document.typ index d30d5d8..d3e5aa1 100644 --- a/document.typ +++ b/document.typ @@ -69,7 +69,7 @@ margin: ("x":0cm,"y":0cm) #grid( columns: (1fr,2fr,2fr), align: (horizon+right,horizon+center,horizon+center), - stroke: (x,y) => if int(times.at(y*2+8)) == current_hour or int(times.at(y*2+9)) == current_hour{(y:black)}, + stroke: (x,y) => if int(times.at(y*2+8)) == current_hour {(y:black)} else if int(times.at(y*2+9)) == current_hour {(bottom:black)}, ..values.flatten().map(x => text(size:1.7em)[#x]) ) diff --git a/update.sh b/update.sh index addaad7..f781ebe 100755 --- a/update.sh +++ b/update.sh @@ -1,7 +1,7 @@ #!/bin/bash echo "Get weather data..." -wget -O tmpweather.json "https://api.open-meteo.com/v1/forecast?latitude=43.4516&longitude=-80.4925&hourly=temperature_2m,weather_code&start_date=2025-08-23&end_date=2025-08-23&timezone=America/Toronto" +wget -O tmpweather.json "https://api.open-meteo.com/v1/forecast?latitude=43.4516&longitude=-80.4925&hourly=temperature_2m,weather_code&start_date=$(date +%Y-%m-%d)&end_date=$(date +%Y-%m-%d)&timezone=America/Toronto" jq --arg timestamp "$(date '+%Y %m %d %H %M %S')" '. + {"timestamp": $timestamp}' tmpweather.json > weather.json echo "Generate document..." ./typst compile --format png document.typ