From cc1a11c9366d1cc882826f37df3632047bf1c872 Mon Sep 17 00:00:00 2001 From: Jeffrey Serio Date: Fri, 25 Oct 2024 12:46:55 -0500 Subject: [PATCH] Add qbt_torrent_stats_html.nu --- .archived/tx-stats-html.nu | 6 +++--- qbt_stats_html.nu | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) create mode 100755 qbt_stats_html.nu diff --git a/.archived/tx-stats-html.nu b/.archived/tx-stats-html.nu index 2c4d85f..9c0588e 100755 --- a/.archived/tx-stats-html.nu +++ b/.archived/tx-stats-html.nu @@ -2,14 +2,14 @@ let old_head = "" let new_head = ( - ["Torrent Stats

Last updated:", (date now | format date "%F %T%:z"), "

"] + ["Torrent Stats

Last updated:", (date now | format date "%F %T%:z"), "

"] | str join ' ' ) ( - transmission-remote -l + /home/jas/admin-scripts/list_torrents.py | from ssv | to html | str replace ($old_head) ($new_head) - | save -f -r /home/jas/public/html/torrentstats.html + | save -f -r /home/jas/public/html/torrents.html ) diff --git a/qbt_stats_html.nu b/qbt_stats_html.nu new file mode 100755 index 0000000..9c0588e --- /dev/null +++ b/qbt_stats_html.nu @@ -0,0 +1,15 @@ +#!/usr/bin/env nu + +let old_head = "" +let new_head = ( + ["Torrent Stats

Last updated:", (date now | format date "%F %T%:z"), "

"] + | str join ' ' +) + +( + /home/jas/admin-scripts/list_torrents.py + | from ssv + | to html + | str replace ($old_head) ($new_head) + | save -f -r /home/jas/public/html/torrents.html +)