WIP: Don't count reinstalled packages in pacplot
This commit is contained in:
parent
9a88ca30ec
commit
51db656837
1 changed files with 4 additions and 3 deletions
5
pacplot
5
pacplot
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue