mirror of
https://codeberg.org/hyperreal/admin-scripts
synced 2024-11-01 16:03:06 +01:00
Add qbt_torrent_stats_html.nu
This commit is contained in:
parent
6efc4c19ae
commit
cc1a11c936
@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
let old_head = "<html><style>body { background-color:white;color:black; }</style><body>"
|
let old_head = "<html><style>body { background-color:white;color:black; }</style><body>"
|
||||||
let new_head = (
|
let new_head = (
|
||||||
["<html><head><title>Torrent Stats</title><link type="text/css" rel="stylesheet" href="style2.css"/></head><body><h4>Last updated:", (date now | format date "%F %T%:z"), "</h4>"]
|
["<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 ' '
|
| str join ' '
|
||||||
)
|
)
|
||||||
|
|
||||||
(
|
(
|
||||||
transmission-remote -l
|
/home/jas/admin-scripts/list_torrents.py
|
||||||
| from ssv
|
| from ssv
|
||||||
| to html
|
| to html
|
||||||
| str replace ($old_head) ($new_head)
|
| str replace ($old_head) ($new_head)
|
||||||
| save -f -r /home/jas/public/html/torrentstats.html
|
| save -f -r /home/jas/public/html/torrents.html
|
||||||
)
|
)
|
||||||
|
15
qbt_stats_html.nu
Executable file
15
qbt_stats_html.nu
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/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 ' '
|
||||||
|
)
|
||||||
|
|
||||||
|
(
|
||||||
|
/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
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user