mirror of
https://codeberg.org/hyperreal/admin-scripts
synced 2024-11-01 08:03:05 +01:00
Fix spaces
This commit is contained in:
parent
11c3fda10f
commit
da006b5919
@ -65,14 +65,14 @@ def print_ssv():
|
|||||||
qb = Client("http://localhost:8080/")
|
qb = Client("http://localhost:8080/")
|
||||||
qb.login()
|
qb.login()
|
||||||
sorted_torrents = sorted(qb.torrents(), key=lambda d: d["name"]) # type: ignore
|
sorted_torrents = sorted(qb.torrents(), key=lambda d: d["name"]) # type: ignore
|
||||||
print("Name Size Trackers Ratio Uploaded")
|
print("Name Size Trackers Ratio Uploaded")
|
||||||
for torrent in sorted_torrents:
|
for torrent in sorted_torrents:
|
||||||
name = torrent["name"] # type: ignore
|
name = torrent["name"] # type: ignore
|
||||||
size = human_bytes(int(torrent["total_size"])) # type: ignore
|
size = human_bytes(int(torrent["total_size"])) # type: ignore
|
||||||
trackers = torrent["trackers_count"] # type: ignore
|
trackers = torrent["trackers_count"] # type: ignore
|
||||||
ratio = torrent["ratio"] # type: ignore
|
ratio = torrent["ratio"] # type: ignore
|
||||||
uploaded = human_bytes(int(torrent["uploaded"])) # type: ignore
|
uploaded = human_bytes(int(torrent["uploaded"])) # type: ignore
|
||||||
print(f"{name} {size} {trackers} {ratio} {uploaded}")
|
print(f"{name} {size} {trackers} {ratio} {uploaded}")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
@ -8,7 +8,7 @@ let new_head = (
|
|||||||
|
|
||||||
(
|
(
|
||||||
/home/jas/admin-scripts/list_torrents.py
|
/home/jas/admin-scripts/list_torrents.py
|
||||||
| from ssv -m 1
|
| from ssv -m 2
|
||||||
| to html
|
| to html
|
||||||
| str replace ($old_head) ($new_head)
|
| str replace ($old_head) ($new_head)
|
||||||
| save -f -r /home/jas/public/html/torrents.html
|
| save -f -r /home/jas/public/html/torrents.html
|
||||||
|
Loading…
Reference in New Issue
Block a user