admin-scripts/.archived/tx-stats-html.nu

16 lines
528 B
Plaintext
Raw Normal View History

2024-03-26 05:05:38 +01:00
#!/usr/bin/env nu
2024-04-02 19:32:26 +02:00
let old_head = "<html><style>body { background-color:white;color:black; }</style><body>"
let new_head = (
2024-10-25 19:46:55 +02:00
["<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>"]
2024-04-02 19:32:26 +02:00
| str join ' '
2024-03-26 05:05:38 +01:00
)
2024-04-02 19:32:26 +02:00
(
2024-10-25 19:46:55 +02:00
/home/jas/admin-scripts/list_torrents.py
2024-04-02 19:32:26 +02:00
| from ssv
| to html
| str replace ($old_head) ($new_head)
2024-10-25 19:46:55 +02:00
| save -f -r /home/jas/public/html/torrents.html
2024-04-02 19:32:26 +02:00
)