From 0e029bbabbd4e07e606b8f8ba6f4eb8c8c9badd2 Mon Sep 17 00:00:00 2001 From: z4yx Date: Wed, 12 Feb 2020 18:51:22 +0800 Subject: [PATCH] add download links to Github releases --- _layouts/index.html | 1 + geninfo/genisolist.ini | 57 ++++++++++++++++++++++++++++++++++++++++++ geninfo/genisolist.py | 2 ++ 3 files changed, 60 insertions(+) diff --git a/_layouts/index.html b/_layouts/index.html index 261d00f..6f5db49 100644 --- a/_layouts/index.html +++ b/_layouts/index.html @@ -148,6 +148,7 @@
diff --git a/geninfo/genisolist.ini b/geninfo/genisolist.ini index 3318eae..7f97bfc 100644 --- a/geninfo/genisolist.ini +++ b/geninfo/genisolist.ini @@ -427,3 +427,60 @@ type = x86_64 version = $1 category = app +[vscodium win] +distro = VS Codium +listvers = 10 +location = github-release/VSCodium/vscodium/*/* +pattern = (VSCodium\w+-\w+)-([\.\d]+)\.exe(?!.) +platform = Windows +type = $1 +version = $2 +category = app + +[vscodium linux tar] +distro = VS Codium +listvers = 10 +location = github-release/VSCodium/vscodium/*/* +pattern = VSCodium-linux-(\w+)-([\.\d]+)\.tar\.gz(?!.) +platform = Linux +type = $1 +version = $2 +category = app + +[vscodium linux package] +distro = VS Codium +listvers = 10 +location = github-release/VSCodium/vscodium/*/* +pattern = codium[_-]([\.\w-]+)[_\.-](x86_64|amd64|armhf|arm64)\.(\w+)(?!.) +platform = Linux +type = $2 $3 +version = $1 +category = app + +[vscodium mac] +distro = VS Codium +listvers = 10 +location = github-release/VSCodium/vscodium/*/* +pattern = VSCodium\.([\.\d]+)\.dmg(?!.) +platform = macOS +type = x86_64 +version = $1 +category = app + +[google fonts] +distro = Google Noto +listvers = 10 +location = github-release/googlefonts/*/*/* +pattern = googlefonts/(noto-\w+)/.*([vV][\.\d-]+\d).*/.+ +type = $1 +version = $2 +category = font + +[Sarasa Gothic] +distro = Sarasa Gothic +listvers = 10 +location = github-release/be5invis/Sarasa-Gothic/*/* +pattern = .+-(\w+)-([\.\d]+)\.\w+ +type = $1 +version = $2 +category = font diff --git a/geninfo/genisolist.py b/geninfo/genisolist.py index 1349271..03ca297 100755 --- a/geninfo/genisolist.py +++ b/geninfo/genisolist.py @@ -66,6 +66,8 @@ def parseSection(items): for prop in ("version", "type", "platform", "category"): imageinfo[prop] = renderTemplate(items.get(prop, ""), result) + if 'version' not in imageinfo: + imageinfo['version'] = '0.0' logger.debug("[JSON] %r", imageinfo) key = renderTemplate(items.get("key_by", ""), result)