archrepo2/scripts/test_readpkg.py
lilydjwg 051427c7b1 setup.py and directory structure change
and README switched to rst
2013-08-23 12:19:53 +08:00

11 lines
310 B
Python
Executable file

#!/usr/bin/env python3
# vim:fileencoding=utf-8
from subprocess import getoutput
allpkgs = getoutput(r"locate -be --regex '\.pkg\.tar\.xz$'").split('\n')
from archrepo2.pkgreader import readpkg
for p in allpkgs:
print('reading package:', p)
d = readpkg(p)
print('desc:', d.get('pkgdesc', '(nothing)'))