admin-scripts/shell/qbt_stats_html.nu

16 lines
560 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 = (
2024-11-09 00:18:47 +01:00
["<html><head><title>Torrent Stats</title><link type="text/css" rel="stylesheet" href="https://files.hyperreal.coffee/css/style1.css"/></head><body><h4>Last updated:", (date now | format date "%F %T%:z"), "</h4>"]
2024-10-25 19:46:55 +02:00
| str join ' '
)
(
2024-11-16 18:12:19 +01:00
/home/jas/.local/bin/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
)