From 2be5bfec9cef456ad910206950e58edd3765acb6 Mon Sep 17 00:00:00 2001 From: Jeffrey Serio Date: Wed, 19 Feb 2025 19:00:26 -0600 Subject: [PATCH] Add antiX --- pyproject.toml | 8 ++++---- qbt_helper.py | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 33f20bf..c6bb138 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,8 @@ [project] name = "qbt-helper" -version = "0.3" +version = "0.5" authors = [ - { name="Jeffrey Serio", email="hyperreal@fedoraproject.org" }, + { name="Jeffrey Serio", email="hyperreal@moonshadow.dev" }, ] description = "Helper program for adding torrents from URLs to a qBittorrent instance." readme = "README.md" @@ -18,8 +18,8 @@ dependencies = ["beautifulsoup4>=4.12.3", "docopt>=0.6.2", "qbittorrent-api>=202 qbt-helper = "qbt_helper:main" [project.urls] -Homepage = "https://codeberg.org/hyperreal/qbt-helper" -Issues = "https://codeberg.org/hyperreal/qbt-helper/issues" +Homepage = "https://git.hyperreal.coffee/hyperreal/qbt-helper" +Issues = "https://git.hyperreal.coffee/hyperreal/qbt-helper/issues" [build-system] requires = ["hatchling"] diff --git a/qbt_helper.py b/qbt_helper.py index 2ad51f8..85f5ded 100755 --- a/qbt_helper.py +++ b/qbt_helper.py @@ -105,6 +105,35 @@ def get_almalinux_urls(rel_ver: str) -> list: return urls +def get_antix_urls(rel_ver: str) -> list: + """ + Add antiX URLs. + + Params: + relver: the antiX release version. + """ + urls = [ + f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}_386-base.iso.torrent", + f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}_386-core.iso.torrent", + f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}_386-full.iso.torrent", + f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}-x64-base.iso.torrent", + f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}-x64-core.iso.torrent", + f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}-x64-full.iso.torrent", + f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}-net_386-net.iso.torrent", + f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}-net_x64-net.iso.torrent", + f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}-runit_386-base.iso.torrent", + f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}-runit_386-core.iso.torrent", + f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}-runit_386-full.iso.torrent", + f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}-runit_x64-base.iso.torrent", + f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}-runit_x64-core.iso.torrent", + f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}-runit_x64-full.iso.torrent", + f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}-runit-net_386-net.iso.torrent", + f"https://l2.mxrepo.com/torrents/antiX-{rel_ver}-runit-net_x64-net.iso.torrent", + ] + + return urls + + def get_debian_urls(rel_ver: str) -> list: """ Add Debian torrents from a list of URLs. @@ -302,6 +331,7 @@ def main(): distros = [ "AlmaLinux", + "antiX", "Debian", "Devuan", "Fedora", @@ -337,6 +367,15 @@ def main(): case _: exit("Invalid action choice.") + case "antiX": + match action[0]: + case "a": + add_torrents(get_antix_urls(action[1]), conn_info) + case "r": + remove_torrents(f"antiX-{action[1]}", conn_info) + case _: + exit("Invalid action choice.") + case "Debian": match action[0]: case "a":