commit 139342d0e9e8597f59b2b058099564220a418ac7
parent 650ff4b105eedc2174222e6dbb11847ca0978e50
Author: breadcat <breadcat@users.noreply.github.com>
Date: Mon, 5 Jan 2026 17:46:52 +0000
Work with any year data, not just current year
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/blog-weight.nix b/scripts/blog-weight.nix
@@ -22,7 +22,7 @@
printf "Drawing graph... "
weight_rawdata="$(awk '/<pre>/{flag=1; next} /<\/pre>/{flag=0} flag' "$weight_filename" | sort -u)"
weight_dateinit="$(awk '/date:/ {print $2}' "$weight_filename")"
- grep "^$(date +%Y)-" <<<"$weight_rawdata" >temp.dat
+ grep "^2[0-9]\{3\}-" <<<"$weight_rawdata" >temp.dat
${pkgs.gnuplot}/bin/gnuplot <<-EOF
set grid
set datafile separator comma