admin-scripts/qbt_stats_html.nu

16 lines
543 B
Plaintext
Raw Normal View History

2024-10-25 19:46:55 +02:00
#!/usr/bin/env nu
let old_head = "<html><style>body { background-color:white;color:black; }</style><body>"
let new_head = (
["<html><head><title>Torrent Stats</title><link type="text/css" rel="stylesheet" href="https://files.hyperreal.coffee/css/main-style.css"/></head><body><h4>Last updated:", (date now | format date "%F %T%:z"), "</h4>"]
| str join ' '
)
(
2024-11-08 15:09:25 +01:00
uv run -q /home/jas/admin-scripts/list_torrents.py
2024-10-25 19:54:12 +02:00
| from ssv -m 2
2024-10-25 19:46:55 +02:00
| to html
| str replace ($old_head) ($new_head)
| save -f -r /home/jas/public/html/torrents.html
)