diff --git a/.gitmodules b/.gitmodules index af11e99..ea5c491 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,3 +2,6 @@ path = help/_posts/mirrorz-help-ng-transpiled url = https://github.com/tuna/mirrorz-help-ng.git branch = transpiled +[submodule "geninfo/z-geninfo"] + path = geninfo/z-geninfo + url = https://github.com/mirrorz-org/genisolist.git diff --git a/geninfo/distro.ini b/geninfo/distro.ini new file mode 100644 index 0000000..253a829 --- /dev/null +++ b/geninfo/distro.ini @@ -0,0 +1,12 @@ +[%distro%] +d10 = Ubuntu +d20 = Ubuntu 衍生版 +d30 = Debian +d40 = Arch Linux +d45 = Manjaro +d50 = Fedora +d60 = Deepin +d70 = Kali Linux +d80 = openSUSE +d90 = CentOS +# Distro not listed are set to 0xFFFF as default (to be at the end of the list) diff --git a/geninfo/genisolist.ini b/geninfo/genisolist.ini deleted file mode 100644 index 3aac768..0000000 --- a/geninfo/genisolist.ini +++ /dev/null @@ -1,1380 +0,0 @@ -# This file is the config required by genisolist.py - -# This special section named "%main%" defined following variables: -# "root": HTTP root of mirrors. The script will locate the images in it. -# "urlbase": URL of mirrors prepended to image path. We want to use relative -# path, so set it to '/' instead of complete URL. -# "d[N]": For distribution sorting. where N is an positive integer. The value -# is disto name specified in below sections. Lower N makes the distro -# show higher. Default N is 0xFFFF for distro not mentioned. -[%main%] -root = /data/ -urlbase = / -d10 = Arch Linux -d20 = Debian -d21 = Debian non-free -d25 = CentOS -d30 = Fedora -d40 = Ubuntu -d50 = Ubuntu 衍生版 -d60 = Deepin - -# Sections whose name isn't "%main%" defined a detect rule of image detection. -[archlinux] -# Section name is of no use, the display name is specified in "distro" option. -distro = Arch Linux -# listvers defined how many latest versions to display. -listvers = 1 -# "location" specifies globbing pathname of the image. The path is relative to -# the HTTP root (aka "root" in [%main%] section). Not all images match it is -# considered, you can use "pattern" option below to filter. -location = archlinux/iso/latest/archlinux-*.iso -# "pattern" is a regular expression. If the pattern is found in image path -# found by "location", then the image is valid. Group capturing is to extract -# image info from image path name. -pattern = archlinux-(\d+\.\d+\.\d+)-(\w+).iso -# Following 3 options describes image info. "type" and "platform" is optional. -# $1, $2... here will be replaced by the string captured in above "pattern". -# Additionally, $0 will be replaced by the whole string matches the pattern. -# "version" is also used as the key to sort images of the same distro. -version = $1 -type = CLI-only -platform = $2 -# "key_by" (a.k.a group by) should be used when images of different types or platform have -# different version number, see lineageOS below. -# "nosort" should be used when sort is not possible (i.e. no version number), -# in which case listvers should not be set -# nosort would be effective when "nosort" presents, regardless its value - -[alpine] -distro = Alpine -listvers = 1 -location = alpine/latest-stable/releases/*/*.iso -pattern = alpine/latest-stable/releases/(\w+)/alpine-(\w+)-([0-9.]+)-\w+\.iso -version = $3 -type = $2 -platform = $1 - -[artix] -distro = Artix Linux -listvers = 1 -location = artixlinux-iso/*.iso -pattern = artix-(community-)?(\w+-\w+)-([0-9\.]+)-(\w+)\.iso -version = $3 -type = $2 -platform = $4 -key_by = $2 $4 -sort_by = $4 $2 - -[ubuntu_desktop] -distro = Ubuntu -listvers = 4 -location = ubuntu-releases/[a-z]*/ubuntu-*-desktop-*.iso -pattern = ubuntu-([0-9.]+)-desktop-(\w+).iso -version = $1 -type = Desktop LiveDVD -platform = $2 - -[ubuntu_preinstalled_desktop] -distro = Ubuntu -listvers = 4 -location = ubuntu-cdimage/releases/[a-z]*/release/ubuntu-*-preinstalled-desktop-*.img.xz -pattern = ubuntu-([0-9.]+)-preinstalled-desktop-(.+).img.xz -version = $1 -type = Preinstalled Desktop -platform = $2 - -[ubuntu_live_server] -distro = Ubuntu -listvers = 4 -# If one glob is not enough for locating all images, you can use "location_N" -# to specify more globs. N start from 0 and must a sequence (0,1,2...). -location_0 = ubuntu-releases/[a-z]*/ubuntu-*-live-server-*.iso -location_1 = ubuntu-cdimage/releases/[a-z]*/release/ubuntu-*-live-server-*.iso -pattern = ubuntu-([0-9.]+)-live-server-(.+).iso -version = $1 -type = Server -platform = $2 - -[ubuntu_preinstalled_server] -distro = Ubuntu -listvers = 4 -location = ubuntu-cdimage/releases/[a-z]*/release/ubuntu-*-preinstalled-server-*.img.xz -pattern = ubuntu-([0-9.]+)-preinstalled-server-(.+).img.xz -version = $1 -type = Preinstalled Server -platform = $2 - -# If live and preinstalled server match failed, fallback to default server. -# Currently this rule couldn't match any more file. -[ubuntu_server] -distro = Ubuntu -listvers = 4 -location_0 = ubuntu-releases/[a-z]*/ubuntu-*-server-*.iso -location_1 = ubuntu-cdimage/releases/[a-z]*/release/ubuntu-*-server-*.iso -pattern = ubuntu-([0-9.]+)-server-(\w+).iso -version = $1 -type = Server -platform = $2 - -# You can apply multiple rules (sections) for the same distro like following -# four sections. They will be shown in the same submenu on our web page. -[ubuntukylin] -distro = Ubuntu 衍生版 -listvers = 1 -location_0 = ubuntu-cdimage/ubuntukylin/releases/[a-z]*/release/ubuntukylin-*-desktop-i386.iso -location_1 = ubuntu-cdimage/ubuntukylin/releases/[a-z]*/release/ubuntukylin-*-desktop-amd64.iso -pattern = ubuntukylin-([0-9.]+)-desktop-(\w+).iso -# Just a small trick. Constant string prefix won't affect sorting. -version = Ubuntu Kylin $1 -platform = $2 - -[kubuntu] -distro = Ubuntu 衍生版 -listvers = 1 -location_0 = ubuntu-cdimage/kubuntu/releases/[a-z]*/release/kubuntu-*-desktop-i386.iso -location_1 = ubuntu-cdimage/kubuntu/releases/[a-z]*/release/kubuntu-*-desktop-amd64.iso -pattern = kubuntu-([0-9.]+)-desktop-(\w+).iso -version = Kubuntu $1 -platform = $2 - - -[lubuntu] -distro = Ubuntu 衍生版 -listvers = 1 -location_0 = ubuntu-cdimage/lubuntu/releases/[a-z]*/release/lubuntu-*-desktop-i386.iso -location_1 = ubuntu-cdimage/lubuntu/releases/[a-z]*/release/lubuntu-*-desktop-amd64.iso -pattern = lubuntu-([0-9.]+)-desktop-(\w+).iso -version = Lubuntu $1 -platform = $2 - -[xubuntu] -distro = Ubuntu 衍生版 -listvers = 1 -location_0 = ubuntu-cdimage/xubuntu/releases/[a-z]*/release/xubuntu-*-desktop-i386.iso -location_1 = ubuntu-cdimage/xubuntu/releases/[a-z]*/release/xubuntu-*-desktop-amd64.iso -pattern = xubuntu-([0-9.]+)-desktop-(\w+).iso -version = Xubuntu $1 -platform = $2 - -[ubuntu_gnome] -distro = Ubuntu 衍生版 -listvers = 1 -location_0 = ubuntu-cdimage/ubuntu-gnome/releases/[a-z]*/release/ubuntu-gnome-*-desktop-i386.iso -location_1 = ubuntu-cdimage/ubuntu-gnome/releases/[a-z]*/release/ubuntu-gnome-*-desktop-amd64.iso -pattern = ubuntu-gnome-([0-9.]+)-desktop-(\w+).iso -version = Ubuntu Gnome $1 -platform = $2 - -[ubuntu_mate] -distro = Ubuntu 衍生版 -listvers = 1 -location_0 = ubuntu-cdimage/ubuntu-mate/releases/[a-z]*/release/ubuntu-mate-*-desktop-i386.iso -location_1 = ubuntu-cdimage/ubuntu-mate/releases/[a-z]*/release/ubuntu-mate-*-desktop-amd64.iso -pattern = ubuntu-mate-([0-9.]+)-desktop-(\w+).iso -version = Ubuntu Mate $1 -platform = $2 - -[ubuntu_netinst] -distro = Ubuntu -location_0 = ubuntu/dists/*/main/installer-*/current/images/netboot -location_1 = ubuntu-ports/dists/*/main/installer-*/current/images/netboot -pattern = dists/(.+)/main/installer-(.+)/current/images/netboot -version = $1 -platform = $2 -listvers = 3 -type = network installer directory - -[ubuntu_core] -distro = Ubuntu Core -location = ubuntu-cdimage/ubuntu-core/*/stable/current/ubuntu-core-*.img.xz -pattern = ubuntu-core-([0-9]+)-(.+).img.xz -version = $1 -platform = $2 -listvers = 3 -type = .img.xz - -[debian_cd] -distro = Debian -listvers = 1 -location_0 = debian-cd/current/amd64/iso-cd/debian-*-amd64-*-CD-1.iso -location_1 = debian-cd/current/i386/iso-cd/debian-*-i386-*-CD-1.iso -pattern = debian-([0-9.]+)-(\w+)-(\w+)-CD-1.iso -version = $1 -type = CD installer with $3 -platform = $2 - -[debian_netinst] -distro = Debian -listvers = 1 -location_0 = debian-cd/current/amd64/iso-cd/debian-*-amd64-netinst.iso -location_1 = debian-cd/current/i386/iso-cd/debian-*-i386-netinst.iso -pattern = debian-([0-9.]+)-(\w+)-netinst.iso -version = $1 -type = Network installer -platform = $2 - -[debian_dvd] -distro = Debian -listvers = 1 -location_0 = debian-cd/current/amd64/iso-dvd/debian-*-amd64-DVD-*.iso -location_1 = debian-cd/current/i386/iso-dvd/debian-*-i386-DVD-*.iso -pattern = debian-([0-9.]+)-(\w+)-DVD-(\d).iso -version = $1 -type = DVD installer (Part $3) -platform = $2 - -[debian_live] -distro = Debian -listvers = 1 -location_0 = debian-cd/current-live/amd64/iso-hybrid/debian-live-*-amd64-*.iso -location_1 = debian-cd/current-live/i386/iso-hybrid/debian-live-*-i386-*.iso -pattern = debian-live-([0-9.]+)-(\w+)-(\w+).iso -version = $1 -type = Live CD with $3 -platform = $2 - -[debian_netinst_nonfree] -distro = Debian non-free -listvers = 1 -location_0 = debian-nonfree/cd-including-firmware/current/amd64/iso-cd/firmware-*-amd64-netinst.iso -location_1 = debian-nonfree/cd-including-firmware/current/i386/iso-cd/firmware-*-i386-netinst.iso -pattern = firmware-([0-9.]+)-(\w+)-netinst.iso -version = $1 -type = Network installer with non-free firmware -platform = $2 - -[debian_dvd_nonfree] -distro = Debian non-free -listvers = 1 -location_0 = debian-nonfree/cd-including-firmware/current/amd64/iso-dvd/firmware-*-amd64-DVD-*.iso -location_1 = debian-nonfree/cd-including-firmware/current/i386/iso-dvd/firmware-*-amd64-DVD-*.iso -pattern = firmware-([0-9.]+)-(\w+)-DVD-(\d).iso -version = $1 -type = DVD installer with non-free firmware (Part $3) -platform = $2 - -[debian_live_nonfree] -distro = Debian non-free -listvers = 1 -location_0 = debian-nonfree/images-including-firmware/current-live/amd64/iso-hybrid/debian-live-*-amd64-*+nonfree.iso -location_1 = debian-nonfree/images-including-firmware/current-live/i386/iso-hybrid/debian-live-*-amd64-*+nonfree.iso -pattern = debian-live-([0-9.]+)-(\w+)-(\w+)\+nonfree.iso -version = $1 -type = Live CD with $3 and non-free firmware -platform = $2 - -[centos] -distro = CentOS -listvers = 2 -location = centos/[0-9].*/isos/*/CentOS-[0-9]*.iso -pattern = CentOS-([0-9.]+)-(\w+)-((bin-)?\w+?)(-[0-9]+|).iso -version = $1 -type = $3 -platform = $2 - -[centos_stream_8] -distro = CentOS -listvers = 2 -location = centos/[0-9]-stream/isos/*/CentOS-*.iso -pattern = CentOS-Stream-([0-9.]+)-(\w+)-latest-(\w+).iso -version = $1 stream -type = $3 -platform = $2 - -[centos_stream] -distro = CentOS -listvers = 2 -location = centos-stream/[0-9]-stream/BaseOS/*/iso/CentOS-*.iso -pattern = CentOS-Stream-([0-9.]+)-latest-(\w+)-(\w+).iso -version = $1 stream -type = $3 -platform = $2 - -[fedora_workstation] -distro = Fedora -listvers = 2 -location_0 = fedora/releases/[1-9][0-9]/Workstation/*/iso/Fedora-Workstation-Live-*-[1-9][0-9]-*.iso -pattern = Fedora-Workstation-Live-(\w+)-(\d+)-.*\.iso -version = $2 -type = Live CD with standard workstation desktop environment -platform = $1 - -[fedora_spins] -distro = Fedora -listvers = 2 -location_0 = fedora/releases/[1-9][0-9]/Spins/*/iso/Fedora-*-Live-*-[1-9][0-9]-*.iso -pattern = Fedora-(\w+)-Live-(\w+)-(\d+)-.*\.iso -version = $3 -type = Live CD with $1 -platform = $2 - -[fedora_server] -distro = Fedora -listvers = 2 -location_0 = fedora/releases/[1-9][0-9]/Server/*/iso/Fedora-Server-*-[1-9][0-9]-*.iso -pattern = Fedora-Server-(\w+)-(\w+)-(\d+)-.*\.iso -version = $3 -type = Server $1 -platform = $2 - -[fedora_silverblue] -distro = Fedora -listvers = 2 -location_0 = fedora/releases/[1-9][0-9]/Silverblue/*/iso/Fedora-Silverblue-*-[1-9][0-9]-*.iso -pattern = Fedora-Silverblue-(\w+)-(\w+)-(\d+)-.*\.iso -version = $3 -type = Silverblue $1 -platform = $2 - -[fedora_everything] -distro = Fedora -listvers = 2 -location_0 = fedora/releases/[1-9][0-9]/Everything/*/iso/Fedora-Everything-*-[1-9][0-9]-*.iso -pattern = Fedora-Everything-(\w+)-(\w+)-(\d+)-.*\.iso -version = $3 -type = Everything $1 -platform = $2 - -[opensuse_leap] -distro = openSUSE -listvers = 3 -location_0 = opensuse/distribution/leap/[0-9][0-9].[0-9]/iso/openSUSE-Leap-[0-9][0-9].[0-9]-DVD-*.iso -pattern = openSUSE-Leap-([0-9.]+)-DVD-(\w+).iso -version = $1 -platform = $2 - -[opensuse tumbleweed] -distro = openSUSE -listvers = 1 -location_0 = opensuse/tumbleweed/iso/openSUSE-Tumbleweed-DVD-*-Current.iso -location_1 = opensuse/tumbleweed/iso/openSUSE-Tumbleweed-GNOME-Live-*-Current.iso -location_2 = opensuse/tumbleweed/iso/openSUSE-Tumbleweed-KDE-Live-*-Current.iso -pattern = openSUSE-Tumbleweed-(DVD|GNOME-Live|KDE-Live)-(\w+)-Current.iso -version = Tumbleweed -type = $1 -platform = $2 - -[opensuse] -distro = openSUSE -listvers = 1 -location_0 = opensuse/distribution/[0-9][0-9].[0-9]/iso/openSUSE-[0-9][0-9].[0-9]-DVD-*.iso -location_1 = opensuse/distribution/[0-9][0-9].[0-9]/iso/openSUSE-[0-9][0-9].[0-9]-GNOME-Live-*.iso -location_2 = opensuse/distribution/[0-9][0-9].[0-9]/iso/openSUSE-[0-9][0-9].[0-9]-KDE-Live-*.iso -pattern = openSUSE-([0-9.]+)-(DVD|GNOME-Live|KDE-Live)-(\w+).iso -version = $1 -type = $2 -platform = $3 - -#[manjaro arm] -#distro = Manjaro ARM -#listvers = 1 -#location = osdn/storage/g/m/ma/manjaro-arm/*/*/*/*.img.xz -#pattern = /manjaro-arm/([-\w]+)/([-\w]+)/([0-9\.]+)/.+?(-emmc-installer)?.+\.img\.xz -#version = $3 -#type = $2$4 -#platform = $1 -#key_by = $1 $2 -#sort_by = $1 $2 -# -#[manjaro] -#distro = Manjaro -#listvers = 1 -#location_0 = osdn/storage/g/m/ma/manjaro/*/*/manjaro-*.iso -#location_1 = osdn/storage/g/m/ma/manjaro/*/*/minimal/manjaro-*.iso -#pattern = /manjaro/(\w+)/([0-9\.]+)(/minimal)?/[^/]+\.iso -#version = $2 -#type = $1$3 -#platform = x86_64 -#key_by = $3 $1 - -[mxlinux] -distro = MX Linux -listvers = 1 -location = osdn/storage/g/m/mx/mx-linux/ISOs/MX/Final/*.iso -pattern = MX-([0-9\.]+)_(\w+)\.iso -version = $1 -platform = $2 - -[deepin] -distro = Deepin -listvers = 10 -location = deepin-cd/*/*.iso -pattern = deepin-cd/(.+)/deepin-(.+)-(\w+).iso -version = $1 -platform = $3 -type = $2 - -[raspberry-pi-os-images] -distro = Raspberry Pi OS (原 Raspbian) -listvers = 1 -location = raspberry-pi-os-images/raspios*/images/raspios*/*.img.xz -pattern = ([-0-9]+)-raspios-(.+)-(.+)\.img.xz -platform = $3 -type = $2 -version = $1 - -[mint] -distro = Linux Mint -listvers = 1 -location = linuxmint-cd/stable/*/*.iso -pattern = linuxmint-([\d\.]+)-([a-z]+)-(\w+).iso -version = $1 -type = $2 -platform = $3 - -[mint_debian_editon] -distro = Linux Mint -listvers = 1 -location = linuxmint-cd/debian/*.iso -pattern = lmde-([\d\.]+)-([a-z]+)-(\w+).iso -version = LMDE $1 -type = $2 -platform = $3 - -[kali] -distro = Kali -listvers = 3 -location = kali-images/current/*.iso -pattern = kali-linux-([\w\.]+)-([a-z]+(-[a-z]+)*)-(\w+).iso -version = $1 -type = $2 -platform = $4 - -[qt-offline] -distro = Qt -listvers = 1 -location_0 = qt/official_releases/qt/5.*/5.*/qt-opensource-* -location_1 = qt/official_releases/qtcreator/*/*/qt-creator-opensource-* -pattern = (qt|qt-creator)-opensource-(.*?)-([\d.]+).(run|dmg|exe) -platform = $2 -version = $1 offline installer $3 -key_by = $1 -category = app - -[qt-online] -distro = Qt -location = qt/official_releases/online_installers/qt-unified-* -pattern = qt-unified-(.*?)-online.(run|dmg|exe) -platform = $1 -version = Qt Online Installer -nosort = true -category = app - -[msys2] -distro = MSYS2 -listvers = 1 -location = msys2/distrib/msys2-*.exe -pattern = msys2-(i686|x86_64)-(latest).exe -platform = Windows -type = $1 -version = $2 -category = app - -[virtualbox] -distro = VirtualBox -listvers = 1 -location = virtualbox/virtualbox-* -pattern = virtualbox-(.*?)-(latest).(exe|dmg) -platform = $1 -version = $2 -category = app - -[texlive] -distro = TeX 排版系统 -listvers = 1 -location = CTAN/systems/texlive/Images/texlive*.iso -pattern = texlive(\d+)-\d+.iso -platform = Windows & Linux -version = TeX Live $1 -category = app - -[mactex] -distro = TeX 排版系统 -listvers = 1 -location = CTAN/systems/mac/mactex/mactex-*.pkg -pattern = mactex-(\d+).pkg -platform = macOS -version = MacTeX $1 -category = app - -[mactex-pretest] -distro = TeX 排版系统 -listvers = 1 -location = tlpretest/mactex-*.pkg -pattern = mactex-(\d+).pkg -platform = macOS -version = MacTeX (pretest) $1 -category = app - -[miktex] -distro = TeX 排版系统 -listvers = 1 -location = CTAN/systems/win32/miktex/setup/windows-*/basic-miktex-* -pattern = basic-miktex-((\d+.)+\d+)(|-)*(x64)*.exe -platform = Windows -type = $4 -version = MikTeX $1 -category = app - -[miktex-mac] -distro = TeX 排版系统 -listvers = 1 -location = CTAN/systems/win32/miktex/setup/darwin-*/miktex-* -pattern = miktex-((\d+.)+\d+)-darwin-(.*).dmg -platform = macOS -type = $3 -version = MikTeX $1 -category = app - -[thuthesis] -distro = ThuThesis 论文模板 -listvers = 3 -location = github-release/tuna/thuthesis/thuthesis-v*.zip -pattern = thuthesis-v((\d+.)+\d+).zip -platform = TeX Live -type = zip -version = $1 -category = app - -[anaconda3] -distro = Conda -listvers = 1 -location = anaconda/archive/Anaconda* -pattern = (Anaconda3)-([\d\.]+)-(Windows|Linux|MacOSX)-(x86_64|x86).(\w+) -platform = $3/$4 -type = $5 -version = $1 $2 -category = app - -[anaconda2] -distro = Conda -listvers = 1 -location = anaconda/archive/Anaconda* -pattern = (Anaconda2)-([\d\.]+)-(Windows|Linux|MacOSX)-(x86_64|x86).(\w+) -platform = $3/$4 -type = $5 -version = $1 $2 -category = app - -[miniconda37] -distro = Conda -listvers = 1 -location = anaconda/miniconda/Miniconda* -pattern = (Miniconda3-py37)_([\d\.]+)-(Windows|Linux|MacOSX)-(x86_64|x86).(\w+) -platform = $3/$4 -type = $5 -version = $1 $2 -category = app - -[miniconda38] -distro = Conda -listvers = 1 -location = anaconda/miniconda/Miniconda* -pattern = (Miniconda3-py38)_([\d\.]+)-(Windows|Linux|MacOSX)-(x86_64|x86).(\w+) -platform = $3/$4 -type = $5 -version = $1 $2 -category = app - -[miniconda2] -distro = Conda -listvers = 1 -location = anaconda/miniconda/Miniconda* -pattern = (Miniconda2)-([\d\.]+)-(Windows|Linux|MacOSX)-(x86_64|x86).(\w+) -platform = $3/$4 -type = $5 -version = $1 $2 -category = app - -[blender] -distro = Blender -listvers = 2 -location = blender/blender-release/Blender*/blender-* -pattern = /blender-([\d\.]+\w?)-([^\.]+)\.([\w\.]+) -platform = $2 -type = $3 -version = $1 -category = app - -[lineageos] -distro = LineageOS -listvers = 1 -location = lineage-rom/full/*/*/*.zip -pattern = lineage-([0-9.]+)-(\d+)-nightly-(\w+)-signed.zip -platform = $3 -type = $1 -version = $2 -key_by = $1 $3 -sort_by = $3 $1 - -[android-x86] -distro = Android-x86 -listvers = 40 -location = osdn/android-x86/*/*.iso -pattern = osdn/android-x86/[0-9]+/android-(x86_64|x86)-([0-9\.]+)-([\w-]*)\.iso -version = $2 -type = $3 -platform = $1 - -[cm-x86] -distro = Android-x86 -listvers = 10 -location = osdn/android-x86/*/*.iso -pattern = osdn/android-x86/[0-9]+/cm-(x86_64|x86)-([0-9\.]+)-([\w-]*)\.iso -version = Lineage OS-x86 $2 -type = $3 -platform = $1 - -[docker mac] -distro = Docker -listvers = 1 -location = docker-ce/mac/static/stable/x86_64/*.tgz -pattern = docker-([0-9.]+)(-ce)?.tgz -platform = macOS -version = $1 -category = app - -[docker win] -distro = Docker -listvers = 1 -location = docker-ce/win/static/stable/x86_64/*.zip -pattern = docker-([0-9.]+)(-ce)?.zip -platform = Windows -version = $1 -category = app - -[nixos] -distro = NixOS -listvers = 2 -location = nixos-images/nixos-*/latest-nixos-*-*-linux.* -pattern = nixos-([0-9.]+)/latest-nixos-(\w+)-(i686|x86_64)-linux.(\w+)(?!.) -type = $2 $4 -version = $1 -platform = $3 - -[nixos small] -distro = NixOS -listvers = 2 -location = nixos-images/nixos-*-small/latest-nixos-*-*-linux.* -pattern = nixos-([0-9.]+)-small/latest-nixos-(\w+)-(i686|x86_64)-linux.(\w+)(?!.) -type = $2 $4, small channel -version = $1 -platform = $3 - -[solus] -distro = Solus -listvers = 1 -location = solus/images/*/Solus-*.iso -pattern = Solus-([0-9.]+)-([a-zA-z]+).iso -version = $1 -type = $2 -platform = x86_64 - -[eclipse] -distro = Eclipse IDE -listvers = 1 -location_0 = eclipse/technology/epp/downloads/release/[0-9][0-9][0-9][0-9]-[0-9][0-9]/R/eclipse-*.dmg -location_1 = eclipse/technology/epp/downloads/release/[0-9][0-9][0-9][0-9]-[0-9][0-9]/R/eclipse-*.tar.gz -location_2 = eclipse/technology/epp/downloads/release/[0-9][0-9][0-9][0-9]-[0-9][0-9]/R/eclipse-*.zip -pattern = eclipse-([a-z]+)-(\d+-\d+)-R(-incubation)?-(win32|macosx-cocoa|linux-gtk)-(x86_64)\.(zip|tar\.gz|dmg) -platform = $4 -type = x86_64 -version = $1 $2 -key_by = $1 -category = app - -[elvish] -distro = Elvish Shell -listvers = 1 -location = elvish/*/* -pattern = elvish/(\w+)-(\w+)/elvish-(v[\d\.]+)\.(zip|exe|tar.gz)(?!.) -platform = $1 -type = $2 -version = $3 -category = app - -[flutter] -distro = Flutter SDK -listvers = 1 -location = flutter/flutter_infra/releases/stable/*/* -pattern = flutter_(\w+)_v?([\d\.]+(\+hotfix\.\d+)?)-stable\.(zip|tar.xz) -platform = $1 -version = $2 -category = app - -[dart] -distro = Dart SDK -listvers = 1 -location = flutter/dart-archive/channels/stable/release/*.*/sdk/*.zip -pattern = /([\d\.]+)/sdk/dartsdk-(\w+)-(\w+)-release.zip -platform = $2 -type = $3 -version = $1 -category = app - -[iina] -distro = IINA -listvers = 4 -location = iina/IINA*.dmg -pattern = IINA\.(v[\d\.]+)\.dmg -platform = macOS -type = universal -version = $1 -category = app - -[kicad win] -distro = KiCad -listvers = 2 -location = kicad/windows/stable/kicad-*.exe -pattern = kicad-([\.\d_]+)-(\w+)\.exe -platform = Windows -type = $2 -version = $1 -category = app - -[kicad mac x86_64] -distro = KiCad -listvers = 4 -location = kicad/osx/stable/kicad-*.dmg -pattern = kicad-unified-([\.\d_-]+)\.dmg -platform = macOS -type = x86_64 -version = $1 -category = app - -[kicad mac universal] -distro = KiCad -listvers = 4 -location = kicad/osx/stable/kicad-*.dmg -pattern = kicad-unified-universal-([\.\d_-]+)\.dmg -platform = macOS -type = universal -version = $1 -category = app - -[libreoffice] -distro = LibreOffice -listvers = 2 -location = libreoffice/libreoffice/stable/*/*/*/* -pattern = libreoffice/libreoffice/stable/([\d\.]+)/(\w+)/(\w+)/LibreOffice_[\d\.]+_[a-zA-Z]+_[-468x]+(_rpm|_deb)?\.(dmg|msi|tar\.gz)(?!.) -platform = $2 -type = $3 -version = $1 -category = app - -[vscodium win32 exe] -distro = VS Codium -listvers = 10 -location = github-release/VSCodium/vscodium/LatestRelease/* -# VSCodium[Setup|UserSetup]-[arch]-[version].exe -pattern = VSCodium((?:User)?Setup)-(\w+)-([\d\.]+)\.exe(?!.) -platform = win32 -type = exe-$1 $2 -version = $3 -# win32 exe-[Setup|UserSetup] [arch] -sort_by = win32 exe-$1 $2 -category = app - -[vscodium win32 msi] -distro = VS Codium -listvers = 10 -location = github-release/VSCodium/vscodium/LatestRelease/* -# VSCodium-[arch][-updates-disabled]-[version].msi -pattern = VSCodium-(\w+)(-updates-disabled|)-([\d\.]+)\.msi(?!.) -platform = win32 -type = msi$2 $1 -version = $3 -# win32 msi[-updates-disabled] [arch] -sort_by = win32 msi$2 $1 -category = app - -[vscodium linux appimage] -distro = VS Codium -listvers = 5 -location = github-release/VSCodium/vscodium/LatestRelease/* -# VSCodium-[version].glibc2.17-[arch].[AppImage|AppImage.zsync] -pattern = VSCodium-([\d\.]+)\.glibc[\d\.]+-(\w+)\.(AppImage(?:\.zsync)?)(?!.) -platform = linux -type = $3 $2 -version = $1 -# linux [AppImage|AppImage.zsync] [arch] -sort_by = linux $3 $2 -category = app - -[vscodium linux deb] -distro = VS Codium -listvers = 5 -location = github-release/VSCodium/vscodium/LatestRelease/* -# codium_[version]_[arch].deb -pattern = codium_([\d\.]+)_(\w+)\.deb(?!.) -platform = linux -type = deb $2 -version = $1 -# linux deb [arch] -sort_by = linux deb $2 -category = app - -[vscodium linux rpm] -distro = VS Codium -listvers = 5 -location = github-release/VSCodium/vscodium/LatestRelease/* -# codium-[version]-el7.[arch].rpm -pattern = codium-([\d\.]+)[^\.]+\.(\w+)\.rpm(?!.) -platform = linux -type = rpm $2 -version = $1 -# linux rpm [arch] -sort_by = linux rpm $2 -category = app - -[vscodium darwin] -distro = VS Codium -listvers = 5 -location = github-release/VSCodium/vscodium/LatestRelease/* -# VSCodium.[arch].[version].dmg -pattern = VSCodium\.(\w+)\.([\d\.]+)\.dmg(?!.) -platform = darwin -type = dmg $1 -version = $2 -# darwin dmg [arch] -sort_by = darwin dmg $1 -category = app - -[vscodium archives] -distro = VS Codium -listvers = 10 -location = github-release/VSCodium/vscodium/LatestRelease/* -# VSCodium-[os]-[arch]-[version].[zip|tar.gz] -pattern = VSCodium-(\w+)-(\w+)-([\d\.]+)\.(zip|tar\.gz)(?!.) -platform = $1 -type = $4 $2 -version = $3 -# [os] [zip|tar.gz] [arch] -sort_by = $1 $4 $2 -category = app - -[vscodium reh] -distro = VS Codium -listvers = 10 -location = github-release/VSCodium/vscodium/LatestRelease/* -# vscodium-reh-[os]-[arch]-[version].tar.gz -pattern = vscodium-reh-(\w+)-(\w+)-([\d\.]+)\.tar\.gz(?!.) -platform = Remote Extension Host -type = $1 $2 -version = $3 -# reh [os] [arch] -sort_by = reh $1 $2 -category = app - -[vlc-win] -distro = VLC -listvers = 1 -location = videolan-ftp/vlc/*/*/* -pattern = vlc/([\d\.]+)/(win32|win64)/.+\d\.(dmg|exe|msi|7z)(?!.) -platform = $2 -type = $3 -version = $1 -category = app - -[vlc-macosx] -distro = VLC -listvers = 1 -location = videolan-ftp/vlc/*/*/* -pattern = vlc/([\d\.]+)/macosx/.+-[\d\.]+-(.+)\.(dmg|exe|msi|7z)(?!.) -platform = macosx/$2 -type = $3 -version = $1 -category = app - -[vlc-android] -distro = VLC -listvers = 1 -location = videolan-ftp/vlc-android/*/* -pattern = vlc-android/([\d\.]+.*)/.+-[\d\.]+-(.+)\.apk(?!.) -platform = Android/$2 -type = apk -version = $1 -category = app - -[vlc-iOS] -distro = VLC -listvers = 1 -location = videolan-ftp/vlc-iOS/*/* -pattern = vlc-iOS/([\d\.]+.*)/.*\.ipa(?!.) -platform = iOS -type = ipa -version = $1 -category = app - -[julia] -distro = Julia -listvers = 1 -location = julia-releases/bin/*/*/*/julia-* -# This regex does not capture release candidate (rc) versions -pattern = /(x64|x86|aarch64|armv7l)/[\d\.]+/julia-([\d\.]+)-(freebsd|mac|linux|win)\d*-?\w+\.(dmg|pkg|exe|tar\.gz)(?!.) -platform = $3/$1 -version = $2 -type = $4 -key_by = $3 $2 -category = app - -[adobe source fonts] -distro = Adobe Source -listvers = 100 -location_0 = adobe-fonts/source-sans-pro/*/*.* -location_1 = adobe-fonts/source-serif-pro/*/*.* -location_2 = adobe-fonts/source-code-pro/*/*.* -pattern = (\w+)-(\w+)\.(ttf|otf) -platform = $2 -type = $3 -version = $1 -category = font - -[adobe source han fonts] -distro = Adobe Source Han -location_0 = adobe-fonts/source-han-sans/*/*.* -location_1 = adobe-fonts/source-han-sans/*/*/*.* -location_2 = adobe-fonts/source-han-serif/*/*.* -location_3 = adobe-fonts/source-han-serif/*/*/*.* -pattern = source-han-(sans|serif)/(.*)/(.*)\.(ttc|ttf|otf|zip) -platform = $1 -type = $4 -version = $2 $3 -category = font - -[google fonts] -distro = Google Fonts -location = github-release/googlefonts/*/*/* -pattern = googlefonts/(noto-\w+)/(?!LatestRelease).*/(.+\.zip) -version = $1 $2 -category = font -nosort = true - -[Sarasa Gothic] -distro = Sarasa Gothic -listvers = 10 -location = github-release/be5invis/Sarasa-Gothic/LatestRelease/* -pattern = .+-(\w+)-([\.\d]+)\.\w+ -platform = $1 -version = $2 -category = font - -[Iosevka] -distro = Iosevka -listvers = 10 -location = github-release/be5invis/Iosevka/LatestRelease/* -pattern = /(\d?\d?-?iosevka)((-[a-z]+)*)(-ss\d+)?-([\d\.]+.+)\.zip -platform = iosevka$2$4 -version = $5 -sort_by = $1 $4 -category = font - -[auth-thu] -distro = auth-thu -listvers = 1 -location = github-release/z4yx/GoAuthing/*/* -pattern = GoAuthing/(v[\d\.]+)/auth-thu\.(.+) -platform = $2 -version = auth-thu $1 -category = app - -[texstudio] -distro = TeX 排版系统 -listvers = 1 -location = github-release/texstudio-org/texstudio/LatestRelease/* -pattern = texstudio-([\d\.]+)-(.+)\.(\w+) -platform = $2 -type = $3 -version = TeXstudio $1 -category = app - -[stellarium] -distro = Stellarium -listvers = 1 -location = github-release/Stellarium/stellarium/LatestRelease/* -pattern = (\w+)-([\d\.-]+)[\.-](tar\.gz|pdf|zip|win\d+\.exe|\w+\.AppImage)(?!.) -version = $1 $2 -platform = $3 -key_by = $1 -category = app - -[git-for-win] -distro = Git -listvers = 1 -location = github-release/git-for-windows/git/LatestRelease/* -pattern = (\w+)-([\d\.]+)(-busybox)?-([\d]+-bit)\.(exe|tar\.bz2|zip|7z\.exe)(?!.) -version = $1 $2 -platform = $4$3 -type = $5 -key_by = $1 -category = app - -[FreeCAD] -distro = FreeCAD -listvers = 3 -location = github-release/FreeCAD/FreeCAD/*/* -pattern = FreeCAD[-_]([-\d\.\w]+)[-_](WIN|Linux|OSX|macOS)-([-\w\.]+)\.(exe|7z|AppImage|dmg)(?!.) -version = FreeCAD $1 -platform = $2 -type = $3.$4 -key_by = $1 -category = app - -[kylin] -distro = 优麒麟 -listvers = 10 -location = ubuntukylin/* -pattern = ubuntukylin-([-\d\.\w]+)-([\w]+)-([\w]+)\.iso -version = $1 $2 free -type = iso -platform = $3 -nosort = true - -[KaOS] -distro = KaOS -location = KaOS/* -pattern = KaOS-([^/]+)-([^/]+)\.iso -version = $1 -platform = $2 -type = iso - -[NetBSD] -distro = NetBSD -listvers = 3 -location = NetBSD/iso/*/* -pattern = NetBSD-([\.\d]+)-([-\w]+)\.iso(?!.) -version = $1 -platform = $2 -type = iso - -[Anthon] -distro = Anthon -listvers = 1 -location = anthon/aosc-os/*/*/* -pattern = aosc-os_([^/]+)_([\d\.]+)_(\w+)\.(tar\.xz|img|iso)(?!.) -version = $2 -type = $1 -platform = $3 -key_by = $1 $3 - -[ArchLinuxARM] -distro = Arch Linux ARM -location = archlinuxarm/os/* -pattern = ArchLinuxARM-([^/]+)-latest\.tar\.gz(?!.) -version = latest -type = tar.gz -platform = $1 - -[Armbian] -distro = Armbian -location = armbian-releases/*/archive/* -pattern = Armbian_([\.\d]+)_([^/]+)\.img\.xz(?!.) -version = $1 -platform = $2 -type = img.xz - -[blackarch] -distro = BlackArch -location = blackarch/iso/* -pattern = blackarch-([^/]+)-([^/]+)-([\.\w]+)-([^/]+)\.iso(?!.) -version = $3 -platform = $1 -type = $2 $4 iso - -[Garuda] -distro = Garuda Linux -location = osdn/storage/g/g/ga/garuda-linux/*/*/* -pattern = garuda-([-\w]+)-([\.\w]+)\.iso(?!.) -version = $1 -platform = $2 - -[qubesos] -distro = Qubes OS -listvers = 3 -location = qubesos/iso/* -pattern = Qubes-R([\.\d]+)(-\w+)?-(\w+)\.iso(?!.) -version = $1 -platform = $2 -type = iso - -[lyx] -distro = TeX 排版系统 -listvers = 1 -location = lyx/bin/*/* -pattern = [lL]yx-([\.\d]+)-?_?([^/]+)\.(dmg|exe|tar\.gz)(?!.) -version = LyX $1 -platform = $2 -type = $3 -key_by = $2 $3 -category = app - -[mageia] -distro = Mageia -listvers = 3 -location = mageia/iso/*/*/* -pattern = Mageia-([\d]+)-([^/]+)-([\w]+)\.iso(?!.) -version = $1 -platform = $3 -type = $2 - -[endeavouros] -distro = EndeavourOS -location = endeavouros/iso/* -pattern = endeavouros-([\.\d]+)-(\w+)\.iso(?!.) -version = $1 -platform = $2 -type = iso - -[endeavouros 22] -distro = EndeavourOS -location = endeavouros/iso/* -pattern = EndeavourOS_([_\.\w]+)[_-](\d\d_\d)\.iso(?!.) -version = $1 -platform = $2 -type = iso - -[endeavouros 2023] -distro = EndeavourOS -location = endeavouros/iso/* -pattern = Endeavour[oO][sS]_([_\.\w]+)[_-](\d\d-\d\d\d\d(_R\d)?)\.iso(?!.) -version = $1 -platform = $2 -type = iso - -[linuxlite] -distro = Linux Lite -listvers = 10 -location_0 = osdn/storage/g/l/li/linuxlite/*/*.iso -location_1 = osdn/storage/g/l/li/linuxlite/*/*/*.iso -pattern = linux-lite-([\.\d]+)-(\w+)\.iso(?!.) -version = $1 -platform = $2 -type = iso - -[wireshark win] -distro = Wireshark -location = wireshark/*/* -pattern = Wireshark-([^/]+)-([\.\d]+)\.(exe|msi) -version = $2 -platform = $1 -type = $3 -category = app - -[wireshark portable] -distro = Wireshark -location = wireshark/*/* -pattern = WiresharkPortable_([\.\d]+)\.(paf\.exe) -version = Portable $1 -platform = win -type = $2 -category = app - -[wireshark osx] -distro = Wireshark -location = wireshark/osx/*.dmg -pattern = Wireshark ([\.\d]+) ([^/]+)\.dmg -version = $1 -platform = $2 -type = dmg -category = app - -[cmder] -distro = cmder -location = github-release/cmderdev/cmder/LatestRelease/* -pattern = cmder_?(mini)?\.(7z|zip) -version = cmder $1 -platform = $2 -category = app - -[googlefonts noto cjk] -distro = Google Fonts -category = font -location = github-release/googlefonts/noto-cjk/LatestRelease/* -pattern = repo-snapshot.tar.gz -version = noto-cjk repo-snapshot -platform = tar.gz - -[googlefonts noto emoji] -distro = Google Fonts -category = font -location = github-release/googlefonts/noto-emoji/LatestRelease/* -pattern = repo-snapshot.tar.gz -version = noto-emoji repo-snapshot -platform = tar.gz - -[googlefonts noto fonts] -distro = Google Fonts -category = font -location = github-release/googlefonts/noto-fonts/LatestRelease/* -pattern = repo-snapshot.tar.gz -version = noto-fonts repo-snapshot -platform = tar.gz - -[minikube] -distro = Minikube -category = app -nosort = true -location = github-release/kubernetes/minikube/LatestRelease/* -pattern = ([^/]+)(? 0 - - def __ge__(self, other): - c = self._cmp(other) - if c is NotImplemented: - return c - return c >= 0 - - -class LooseVersion(Version): - component_re = re.compile(r"(\d+ | [a-z]+ | \.)", re.VERBOSE) - - def parse(self, vstring): - self.vstring = vstring - components = [x for x in self.component_re.split(vstring) if x and x != "."] - for i, obj in enumerate(components): - try: - components[i] = int(obj) - except ValueError: - pass - # special handling for "latest" - if components[0] == "latest": - components[0] = float("inf") - - self.version = components - - def __str__(self): - return self.vstring - - def __repr__(self): - return "LooseVersion ('%s')" % str(self) - - def _cmp(self, other): - if isinstance(other, str): - other = LooseVersion(other) - elif not isinstance(other, LooseVersion): - return NotImplemented - - try: - if self.version == other.version: - return 0 - if self.version < other.version: - return -1 - if self.version > other.version: - return 1 - except TypeError: - # if comparison fails, convert everything into string and try again - self_version = [str(x) for x in self.version] - other_version = [str(x) for x in other.version] - if self_version == other_version: - return 0 - if self_version < other_version: - return -1 - if self_version > other_version: - return 1 - - -parser = ArgumentParser( - prog="iso info list generator", - description="Generate iso info list", -) -parser.add_argument("-d", "--dir", default=None, help="Override root directory.") -parser.add_argument( - "-R", - "--remote", - default=None, - help="[Remote Mode] Using rsync to get file list instead of reading from INI. Need the base of target site, for example, `mirror.tuna.tsinghua.edu.cn`.", -) -parser.add_argument( - "-T", - "--test", - default=None, - nargs="*", - help="Test specified `distro`s (multiple arguments input is supported) in INI. If Remote Mode is on, `distro`s must be specified in case of heavy rsync job.", -) - -args = parser.parse_args() - -logger = logging.getLogger(__name__) -CONFIG_FILE = os.path.join(os.path.dirname(__file__), "genisolist.ini") - - -def getPlatformPriority(platform): - platform = platform.lower() - if platform in ["amd64", "x86_64", "64bit"]: - return 100 - elif platform in ["arm64", "aarch64", "arm64v8"]: - return 95 - elif platform in ["riscv64"]: - return 95 - elif platform in ["loongson2f", "loongson3"]: - return 95 - elif platform in ["i386", "i486", "i586", "i686", "x86", "32bit"]: - return 90 - elif platform in ["arm32", "armhf", "armv7"]: - return 85 - else: - return 0 - - -def renderTemplate(template, result): - group_count = len(result.groups()) + 1 - for i in range(group_count): - template = template.replace("$%d" % i, result.group(i) or "") - return template - - -def getSortKeys(template, result): - keys = [] - for i in template.split(" "): - if not i: - continue - if i[0] != "$": - keys.append(i) - else: - keys.append(result.group(int(i[1:])) or "") - return keys - - -def parseSection(items, rsync=False): - items = dict(items) - - if "location" in items: - locations = [items["location"]] - else: - locations = [] - i = 0 - while ("location_%d" % i) in items: - locations.append(items["location_%d" % i]) - i += 1 - - pattern = items.get("pattern", "") - prog = re.compile(pattern) - images = {} - - for location in locations: - if rsync: - # find last non-wildcard path - non_regex = [] - for dir in location.split("/"): - if re.search(r"[\?\*\[\]]", dir): - break - non_regex.append(dir) - prefix = "/".join(non_regex + [""]) - rsync_url = args.remote.rstrip("/") + "/" + prefix - print("[RSync] %s" % rsync_url) - image_paths = rsyncQuery(rsync_url) - - # recover path - image_paths = [prefix + path for path in image_paths] - - # use fnmatch to mimic glob behavior - image_paths = list( - filter(lambda path: fnmatch.fnmatch(path, location), image_paths) - ) - - else: - logger.debug("[GLOB] %s", location) - image_paths = glob.glob(location) - - for imagepath in image_paths: - logger.debug("[FILE] %s", imagepath) - - result = prog.search(imagepath) - - if not (result): - logger.debug("[MATCH] None") - continue - else: - logger.debug("[MATCH] %r", result.groups()) - - imageinfo = {"filepath": imagepath, "distro": items["distro"]} - - for prop in ("version", "type", "platform", "category"): - imageinfo[prop] = renderTemplate(items.get(prop, ""), result) - if "version" not in imageinfo: - imageinfo["version"] = "0.0" - sort_by = items.get("sort_by", "") - if not (sort_by): - imageinfo["sort_key"] = [ - imageinfo["version"], - imageinfo["platform"], - imageinfo["type"], - ] - else: - imageinfo["sort_key"] = getSortKeys(sort_by, result) - - logger.debug("[JSON] %r", imageinfo) - key = renderTemplate(items.get("key_by", ""), result) - if key not in images: - images[key] = [] - images[key].append(imageinfo) - - for image_group in images.values(): - if "nosort" not in items: - image_group.sort( - key=lambda k: ( - LooseVersion(k["version"]), - getPlatformPriority(k["platform"]), - k["type"], - ), - reverse=True, - ) - - i = 0 - versions = set() - listvers = int(items.get("listvers", 0xFF)) - for image in image_group: - versions.add(image["version"]) - if len(versions) <= listvers: - yield image - else: - break - - -def getDetail(image_info, urlbase): - url = urljoin(urlbase, image_info["filepath"]) - desc = ( - "%s (%s%s)" - % ( - image_info["version"], - image_info["platform"], - ", %s" % image_info["type"] if image_info["type"] else "", - ) - if image_info["platform"] != "" - else image_info["version"] - ) - - category = image_info.get("category", "os") or "os" - return (desc, url, category) - - -def getJsonOutput(url_dict, prio={}): - raw = [] - for distro in url_dict: - raw.append( - { - "distro": distro, - "category": list({c for _, _, c in url_dict[distro]})[0], - "urls": [ - {"name": name, "url": url} for name, url, _ in url_dict[distro] - ], - } - ) - - raw.sort(key=lambda d: prio.get(d["distro"], 0xFFFF)) - - return json.dumps(raw, indent=2) - - -def getImageList(): - ini = ConfigParser() - if not (ini.read(CONFIG_FILE)): - raise Exception("%s not found!" % CONFIG_FILE) - - prior = {} - for name, value in ini.items("%main%"): - if re.match(r"d\d+$", name): - prior[value] = int(name[1:]) - - url_dict = {} - root = ini.get("%main%", "root") - urlbase = ini.get("%main%", "urlbase") - - if not args.remote: - # Local - - if args.dir: - # Allow to override root in command-line - root = args.dir - - oldcwd = os.getcwd() - os.chdir(root) - - img_dict = collections.defaultdict(list) - for section in ini.sections(): - if section == "%main%": - continue - for image in parseSection(ini.items(section)): - img_dict[image["distro"]].append(image) - - for distro, images in img_dict.items(): - images.sort(key=lambda x: x["sort_key"], reverse=True) - logger.debug("[IMAGES] %r %r", distro, images) - url_dict[distro] = [getDetail(image, urlbase) for image in images] - - os.chdir(oldcwd) - - else: - # Remote - for spec_distro in args.test: - img_dict = collections.defaultdict(list) - for section in ini.sections(): - if section == "%main%": - continue - if ini.get(section, "distro") != spec_distro: - continue - else: - for image in parseSection(ini.items(section), rsync=True): - img_dict[image["distro"]].append(image) - - for distro, images in img_dict.items(): - images.sort(key=lambda x: x["sort_key"], reverse=True) - logger.debug("[IMAGES] %r %r", distro, images) - url_dict[distro] = [getDetail(image, urlbase) for image in images] - - return getJsonOutput(url_dict, prior) - - -def rsyncQuery(url: str): - rsync_proc = os.popen( - "rsync -r --list-only --no-motd rsync://%s | awk '{ $1=$2=$3=$4=\"\"; print substr($0,5); }'" - % url - ) - return [path.rstrip() for path in rsync_proc.readlines()] - - -if __name__ == "__main__": - import sys - - logging.basicConfig(stream=sys.stderr, level=logging.WARNING) - if args.remote: - if not args.test: - raise ArgumentError( - None, - "If Remote Mode is on, images must be specified in case of heavy rsync job.", - ) - - print(getImageList()) diff --git a/geninfo/z-geninfo b/geninfo/z-geninfo new file mode 160000 index 0000000..d7ad6f6 --- /dev/null +++ b/geninfo/z-geninfo @@ -0,0 +1 @@ +Subproject commit d7ad6f6b33213fb0ddcc1ef8861e6e103cd7eac4 diff --git a/help/_posts/mirrorz-help-ng-transpiled b/help/_posts/mirrorz-help-ng-transpiled index 7cf2830..351af7a 160000 --- a/help/_posts/mirrorz-help-ng-transpiled +++ b/help/_posts/mirrorz-help-ng-transpiled @@ -1 +1 @@ -Subproject commit 7cf283007f02886745259946a794377770ff725c +Subproject commit 351af7a77af5c1ed2a3d349de2878f933d2817cf