#!/usr/bin/env python3 import json, os pkgs = [] for f in os.listdir('repo'): if f.endswith('.pkg.tar.zst') and '-debug-' not in f: size = os.path.getsize(os.path.join('repo', f)) pkgs.append({'name': f, 'size': size}) pkgs.sort(key=lambda p: p['name']) rows = '' for p in pkgs: size_mb = p['size'] / 1024 / 1024 rows += f''' {p['name']} {size_mb:.1f} MB ''' html = f''' euri-pkgs

⟁ euri-pkgs

{len(pkgs)} packages · {sum(p['size'] for p in pkgs) / 1024 / 1024:.0f} MB "I am putting myself to the fullest possible use."
Setup — add this repository to pacman.conf
# /etc/pacman.conf
[euri-pkgs]
SigLevel = Optional TrustAll
Server = https://antergos-nas.taild4360b.ts.net/pkgs/$repo/os/$arch
Server = https://antergos-nas.taild4360b.ts.net/pkgs
{len(pkgs)} packages
{rows}
PackageSize
GitHub · euri-pkgs
''' with open('repo/index.html', 'w') as fp: fp.write(html) with open('repo/pkglist.json', 'w') as fp: json.dump([{'name': p['name'], 'size': p['size']} for p in pkgs], fp, indent=2) fp.write('\n')