From ecedacc2e09e5b06e4f842364a66e37f6ec5c577 Mon Sep 17 00:00:00 2001 From: Xavi Ivars Date: Thu, 12 Oct 2023 00:44:02 +0200 Subject: [PATCH] OpenSuse --- fedora/__init__.py | 2 +- opensuse/__init__.py | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 opensuse/__init__.py diff --git a/fedora/__init__.py b/fedora/__init__.py index 9b38cde..c0d1666 100644 --- a/fedora/__init__.py +++ b/fedora/__init__.py @@ -15,7 +15,7 @@ def get(): return [ download_data( - f'Fedora {version} - Live ISO', + version, url=d['link'], os='linux', get_size=True diff --git a/opensuse/__init__.py b/opensuse/__init__.py new file mode 100644 index 0000000..e8699ad --- /dev/null +++ b/opensuse/__init__.py @@ -0,0 +1,28 @@ +from cachetools import cached, TTLCache + +from utils import download_data, add_program, get_eol_date + +add_program("opensuse", 'opensuse', 'opensuse') + + +@cached(cache=TTLCache(maxsize=10, ttl=300)) +def get(): + + d = get_eol_date('opensuse') + + version = d['cycle'] + + return [ + download_data( + version, + url=f"https://download.opensuse.org/distribution/leap/{version}/iso/openSUSE-Leap-{version}-DVD-x86_64-Media.iso", + os='linux', + get_size=True + ), + download_data( + 'Tumbleweed', + url=f"https://download.opensuse.org/tumbleweed/iso/openSUSE-Tumbleweed-DVD-x86_64-Current.iso", + os='linux', + get_size=True + ) + ]