#!/usr/bin/env nu
let old_head = "
"
let new_head = (
["Torrent StatsLast updated:", (date now | format date "%F %T%:z"), "
"]
| str join ' '
)
(
transmission-remote -l
| from ssv
| to html
| str replace ($old_head) ($new_head)
| save -f -r /home/jas/public/html/torrentstats.html
)