nyaa 0.7.0

A tui tool for browsing and downloading torrents from nyaa.si
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/python3

import tomllib
import subprocess

def version():
    with open("Cargo.toml", "rb") as f:
        data = tomllib.load(f)
        if pkg := data.get("package"):
            return pkg.get("version")
    return None

if __name__ == "__main__":
    choice = input(f"Do you want to publish version {version()} to crates.io [y/N] ").strip().lower() == 'y'
    if choice:
        subprocess.run(["cargo", "publish"])