WIP: Don't count reinstalled packages in pacplot

This commit is contained in:
Anthony Wang 2022-02-08 22:00:49 -06:00
parent 9a88ca30ec
commit 51db656837
Signed by: a
GPG key ID: BC96B00AEC5F2D76

View file

@ -9,15 +9,16 @@ with open('/var/log/pacman.log', 'r') as f:
y = []
for line in f.readlines():
if 'PACKAGEKIT' in line:
# Ignore packagekit operations
continue
if ' installed' in line:
cnt += 1
elif 'upgraded' in line:
pass
elif 'removed' in line:
cnt -= 1
else:
continue
x.append(datetime.fromisoformat(line[1:23] + ':00'))
y.append(cnt)