Name | pkglog JSON |
Version |
1.31
JSON |
| download |
home_page | None |
Summary | Reports concise log of package changes |
upload_time | 2024-06-17 03:47:42 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.7 |
license | GPLv3 |
keywords |
pacman
apt-get
apt
dnf
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
## PKGLOG - Linux utility to output concise log of package changes
[![PyPi](https://img.shields.io/pypi/v/pkglog)](https://pypi.org/project/pkglog/)
[![AUR](https://img.shields.io/aur/version/pkglog)](https://aur.archlinux.org/packages/pkglog/)
This is a Linux command line utility to output a concise list of
packages installed, removed, upgraded, downgraded, or reinstalled. It
should be able to parse package log formats used by the common Linux
distributions. Example output is shown below.
![screenshot](https://user-images.githubusercontent.com/217011/195960110-02a43a1c-366a-4e61-9372-10c4f1f4c55f.png)
1. Most terminals show this output in color, as seen above. Five
different colors are used to identify the package actions as shown
in the table below. You can choose to disable colored output.
2. Changes are grouped together by time so you can distinguish the group
of packages changed each time you did package
updates/installs/removal. By default, all changes with less than a
succeeding 2 minute gap between any of them are grouped together, but
you can change that time value.
3. By default, only package changes over the last 30 days are shown. You
can choose to specify the number of days back, or from a specific
date (optionally plus a time, or specify just a time and today is
assumed), since last boot, or for all time.
4. The `LAST SYSTEM BOOT` line shows you which packages have been
changed since the last boot, e.g. if the linux kernel package has
updated you may decide to reboot asap.
5. You can specify one or more package names and only changes to those
packages are shown. You can specify glob or regular expression
patterns for the names. See the USAGE section below.
6. You can use the `-n/--installed-net` option to see a list of all
packages currently installed and their date of installation. E.g. use
this option after you have installed and removed a heap of trial
packages and you want to easily see if you have actually removed all
of them and their dependencies. E.g. `pkglog -n -d0` shows a net
summary of packages you ended up installing today. Refer to the
[Installed Net Output Options](#installed-net-output-options) section below.
See the latest documentation and code at https://github.com/bulletmark/pkglog.
## Colored Output Lines
|Package Action|Line Text Color
|--------------|-----
|Installed |green
|Removed |red
|Upgraded |yellow
|Downgraded |magenta
|Reinstalled |cyan
You can use a command line option to disable colors explicitly, or set
that option disabled as a [default option](#default-options).
## Log File Formats
Parsers for the following log formats currently exist. The appropriate
parser for you system is normally automatically determined.
Alternatively, you can choose the log file path[s], and/or parser
explicitly. You can also set these as [default
options](#default-options).
A very simple parser plugin architecture is used, so creating a new
parser is easy. Use the `-f/--parser-file` option to explicitly specify
the path to your custom parser for development. By default, parsers are
loaded from the `parsers/` sub-directory so, if cloning, forking, or
submitting a PR for the software, then simply place your custom parser
file in that directory and the program will automatically recognise it.
See the [current parsers](pkglog/parsers) for example code.
|Log Parser|Default Path |Distribution |
|----------|-----------------------|-------------------|
|apt |`/var/log/apt/history*`|Debian, Ubuntu, etc|
|dnf |`/var/log/dnf.rpm.log` |RedHat, Fedora, etc|
|pacman |`/var/log/pacman.log` |Arch, Manjaro, etc |
|zypper |`/var/log/zypp/history`|OpenSUSE |
## Usage
Type `pkglog -h` to view the usage summary:
```
usage: pkglog [-h] [-u | -i | -I | -n] [-N INSTALLED_NET_DAYS]
[-d DAYS | -a | -b] [-j] [-v] [-c]
[-p {pacman,zypper,apt,dnf} | -f PARSER_PLUGIN]
[-t TIMEGAP] [-P PATH] [-g | -r] [-V]
[package ...]
Reports concise log of package changes.
positional arguments:
package specific package name[s] to report
options:
-h, --help show this help message and exit
-u, --updated-only show updated only
-i, --installed show installed/removed only
-I, --installed-only show installed only
-n, --installed-net show net installed only
-N INSTALLED_NET_DAYS, --installed-net-days INSTALLED_NET_DAYS
days previously removed before being re-considered as
new net installed, default=2. Set to 0 to disable.
-d DAYS, --days DAYS show all packages only from given number of days ago,
or from given YYYY-MM-DD[?HH:MM[:SS]],
default=30(days), 0=today, -1=all. If only time is
specified, then today is assumed.
-a, --alldays show all packages for all days (same as "--days=-1")
-b, --boot show only packages updated since last boot
-j, --nojustify don't right justify version numbers
-v, --verbose be verbose, describe upgrades/downgrades
-c, --no-color do not color output lines
-p {pacman,zypper,apt,dnf}, --parser {pacman,zypper,apt,dnf}
log parser type, default=pacman
-f PARSER_PLUGIN, --parser-plugin PARSER_PLUGIN
path to alternate custom parser plugin file
-t TIMEGAP, --timegap TIMEGAP
max minutes gap between grouped changes, default=2
-P PATH, --path PATH alternate log path[s] (separate multiple using ":",
must be time sequenced)
-g, --glob given package name[s] is glob pattern to match
-r, --regex given package name[s] is regular expression to match
-V, --version show pkglog version
Note you can set default starting options in ~/.config/pkglog-flags.conf.
```
## Installed Net Output Options
The purpose of the `-n/--installed-net` option is perhaps not
intuitively clear so this section explains it by way of an example.
There are times when experimenting etc that I install and remove a heap
of various packages, e.g. over a few hours or days. At the end of that
experiment I remove all the packages I believe I installed for my
experiment. However, I am never too sure I have removed everything, e.g.
some dependencies that were automatically installed. So I type:
```bash
$ pkglog -d4 -n
```
The above shows the "net" packages have ended up installed over the last 4
days, i.e. those that were newly installed in the last 4 days and not
yet removed. I can then manually remove any packages I see listed that I
don't want.
There are some favorite packages which I normally have always installed
but I may remove very temporarily for some reason. Since these packages
then appear "newly" installed then they may be undesirably listed in the
`-n/--installed-net` output. To avoid this the `-N/--installed-net-days`
option, by default set to 2 days, removes packages from the
`-n/--installed-net` output which were previously uninstalled only for
that specified number of days or less. You can disable this filter
option by setting it to 0, e.g. as a [default option](#default-options).
## Default Options
You can add default options to a personal configuration file
`~/.config/pkglog-flags.conf`. If that file exists then each line of
options in the file will be concatenated and automatically prepended
to your `pkglog` command line options.
This allow you to set default preferred starting options to `pkglog`.
Type `pkglog -h` to see the options supported.
E.g. `echo "--days 7" >~/.config/pkglog-flags.conf` to make `pkglog`
only display the last 7 days of changes by default. This is also useful
to set your parser explicitly using `-p/--parser` (e.g. if the default
parser is not automatically determined correctly on your system).
## Installation
Arch Linux users can install [pkglog from the
AUR](https://aur.archlinux.org/packages/pkglog).
Python 3.7 or later is required.
Note [pkglog is on PyPI](https://pypi.org/project/pkglog/) so just
ensure that [`pipx`](https://pypa.github.io/pipx/) is installed then
type the following:
```
$ pipx install pkglog
```
To upgrade:
```
$ pipx upgrade pkglog
```
Note that python package
[`looseversion`](https://pypi.org/project/looseversion/) is also
required if you want to parse zypper logs:
```
$ pipx inject pkglog looseversion
```
## License
Copyright (C) 2020 Mark Blakeney. This program is distributed under the
terms of the GNU General Public License.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License, or any later
version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License at <http://www.gnu.org/licenses/> for more details.
# vim: set ai:
```
Raw data
{
"_id": null,
"home_page": null,
"name": "pkglog",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "pacman, apt-get, apt, dnf",
"author": null,
"author_email": "Mark Blakeney <mark.blakeney@bullet-systems.net>",
"download_url": "https://files.pythonhosted.org/packages/9c/8d/3ba75c7988159c7761e151d75bfd884bd461a216d80fc9302690b49cc942/pkglog-1.31.tar.gz",
"platform": null,
"description": "## PKGLOG - Linux utility to output concise log of package changes\n[![PyPi](https://img.shields.io/pypi/v/pkglog)](https://pypi.org/project/pkglog/)\n[![AUR](https://img.shields.io/aur/version/pkglog)](https://aur.archlinux.org/packages/pkglog/)\n\nThis is a Linux command line utility to output a concise list of\npackages installed, removed, upgraded, downgraded, or reinstalled. It\nshould be able to parse package log formats used by the common Linux\ndistributions. Example output is shown below.\n\n![screenshot](https://user-images.githubusercontent.com/217011/195960110-02a43a1c-366a-4e61-9372-10c4f1f4c55f.png)\n\n1. Most terminals show this output in color, as seen above. Five\n different colors are used to identify the package actions as shown\n in the table below. You can choose to disable colored output.\n\n2. Changes are grouped together by time so you can distinguish the group\n of packages changed each time you did package\n updates/installs/removal. By default, all changes with less than a\n succeeding 2 minute gap between any of them are grouped together, but\n you can change that time value.\n\n3. By default, only package changes over the last 30 days are shown. You\n can choose to specify the number of days back, or from a specific\n date (optionally plus a time, or specify just a time and today is\n assumed), since last boot, or for all time.\n\n4. The `LAST SYSTEM BOOT` line shows you which packages have been\n changed since the last boot, e.g. if the linux kernel package has\n updated you may decide to reboot asap.\n\n5. You can specify one or more package names and only changes to those\n packages are shown. You can specify glob or regular expression\n patterns for the names. See the USAGE section below.\n\n6. You can use the `-n/--installed-net` option to see a list of all\n packages currently installed and their date of installation. E.g. use\n this option after you have installed and removed a heap of trial\n packages and you want to easily see if you have actually removed all\n of them and their dependencies. E.g. `pkglog -n -d0` shows a net\n summary of packages you ended up installing today. Refer to the\n [Installed Net Output Options](#installed-net-output-options) section below.\n\nSee the latest documentation and code at https://github.com/bulletmark/pkglog.\n\n## Colored Output Lines\n\n|Package Action|Line Text Color\n|--------------|-----\n|Installed |green\n|Removed |red\n|Upgraded |yellow\n|Downgraded |magenta\n|Reinstalled |cyan\n\nYou can use a command line option to disable colors explicitly, or set\nthat option disabled as a [default option](#default-options).\n\n## Log File Formats\n\nParsers for the following log formats currently exist. The appropriate\nparser for you system is normally automatically determined.\nAlternatively, you can choose the log file path[s], and/or parser\nexplicitly. You can also set these as [default\noptions](#default-options).\n\nA very simple parser plugin architecture is used, so creating a new\nparser is easy. Use the `-f/--parser-file` option to explicitly specify\nthe path to your custom parser for development. By default, parsers are\nloaded from the `parsers/` sub-directory so, if cloning, forking, or\nsubmitting a PR for the software, then simply place your custom parser\nfile in that directory and the program will automatically recognise it.\nSee the [current parsers](pkglog/parsers) for example code.\n\n|Log Parser|Default Path |Distribution |\n|----------|-----------------------|-------------------|\n|apt |`/var/log/apt/history*`|Debian, Ubuntu, etc|\n|dnf |`/var/log/dnf.rpm.log` |RedHat, Fedora, etc|\n|pacman |`/var/log/pacman.log` |Arch, Manjaro, etc |\n|zypper |`/var/log/zypp/history`|OpenSUSE |\n\n## Usage\n\nType `pkglog -h` to view the usage summary:\n\n```\nusage: pkglog [-h] [-u | -i | -I | -n] [-N INSTALLED_NET_DAYS]\n [-d DAYS | -a | -b] [-j] [-v] [-c]\n [-p {pacman,zypper,apt,dnf} | -f PARSER_PLUGIN]\n [-t TIMEGAP] [-P PATH] [-g | -r] [-V]\n [package ...]\n\nReports concise log of package changes.\n\npositional arguments:\n package specific package name[s] to report\n\noptions:\n -h, --help show this help message and exit\n -u, --updated-only show updated only\n -i, --installed show installed/removed only\n -I, --installed-only show installed only\n -n, --installed-net show net installed only\n -N INSTALLED_NET_DAYS, --installed-net-days INSTALLED_NET_DAYS\n days previously removed before being re-considered as\n new net installed, default=2. Set to 0 to disable.\n -d DAYS, --days DAYS show all packages only from given number of days ago,\n or from given YYYY-MM-DD[?HH:MM[:SS]],\n default=30(days), 0=today, -1=all. If only time is\n specified, then today is assumed.\n -a, --alldays show all packages for all days (same as \"--days=-1\")\n -b, --boot show only packages updated since last boot\n -j, --nojustify don't right justify version numbers\n -v, --verbose be verbose, describe upgrades/downgrades\n -c, --no-color do not color output lines\n -p {pacman,zypper,apt,dnf}, --parser {pacman,zypper,apt,dnf}\n log parser type, default=pacman\n -f PARSER_PLUGIN, --parser-plugin PARSER_PLUGIN\n path to alternate custom parser plugin file\n -t TIMEGAP, --timegap TIMEGAP\n max minutes gap between grouped changes, default=2\n -P PATH, --path PATH alternate log path[s] (separate multiple using \":\",\n must be time sequenced)\n -g, --glob given package name[s] is glob pattern to match\n -r, --regex given package name[s] is regular expression to match\n -V, --version show pkglog version\n\nNote you can set default starting options in ~/.config/pkglog-flags.conf.\n```\n\n## Installed Net Output Options\n\nThe purpose of the `-n/--installed-net` option is perhaps not\nintuitively clear so this section explains it by way of an example.\n\nThere are times when experimenting etc that I install and remove a heap\nof various packages, e.g. over a few hours or days. At the end of that\nexperiment I remove all the packages I believe I installed for my\nexperiment. However, I am never too sure I have removed everything, e.g.\nsome dependencies that were automatically installed. So I type:\n\n```bash\n$ pkglog -d4 -n\n```\n\nThe above shows the \"net\" packages have ended up installed over the last 4\ndays, i.e. those that were newly installed in the last 4 days and not\nyet removed. I can then manually remove any packages I see listed that I\ndon't want.\n\nThere are some favorite packages which I normally have always installed\nbut I may remove very temporarily for some reason. Since these packages\nthen appear \"newly\" installed then they may be undesirably listed in the\n`-n/--installed-net` output. To avoid this the `-N/--installed-net-days`\noption, by default set to 2 days, removes packages from the\n`-n/--installed-net` output which were previously uninstalled only for\nthat specified number of days or less. You can disable this filter\noption by setting it to 0, e.g. as a [default option](#default-options).\n\n## Default Options\n\nYou can add default options to a personal configuration file\n`~/.config/pkglog-flags.conf`. If that file exists then each line of\noptions in the file will be concatenated and automatically prepended\nto your `pkglog` command line options.\n\nThis allow you to set default preferred starting options to `pkglog`.\nType `pkglog -h` to see the options supported.\nE.g. `echo \"--days 7\" >~/.config/pkglog-flags.conf` to make `pkglog`\nonly display the last 7 days of changes by default. This is also useful\nto set your parser explicitly using `-p/--parser` (e.g. if the default\nparser is not automatically determined correctly on your system).\n\n## Installation\n\nArch Linux users can install [pkglog from the\nAUR](https://aur.archlinux.org/packages/pkglog).\n\nPython 3.7 or later is required.\nNote [pkglog is on PyPI](https://pypi.org/project/pkglog/) so just\nensure that [`pipx`](https://pypa.github.io/pipx/) is installed then\ntype the following:\n\n```\n$ pipx install pkglog\n```\n\nTo upgrade:\n\n```\n$ pipx upgrade pkglog\n```\n\nNote that python package\n[`looseversion`](https://pypi.org/project/looseversion/) is also\nrequired if you want to parse zypper logs:\n\n```\n$ pipx inject pkglog looseversion\n```\n\n## License\n\nCopyright (C) 2020 Mark Blakeney. This program is distributed under the\nterms of the GNU General Public License.\nThis program is free software: you can redistribute it and/or modify it\nunder the terms of the GNU General Public License as published by the\nFree Software Foundation, either version 3 of the License, or any later\nversion.\nThis program is distributed in the hope that it will be useful, but\nWITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General\nPublic License at <http://www.gnu.org/licenses/> for more details.\n# vim: set ai:\n```\n",
"bugtrack_url": null,
"license": "GPLv3",
"summary": "Reports concise log of package changes",
"version": "1.31",
"project_urls": {
"Homepage": "https://github.com/bulletmark/pkglog"
},
"split_keywords": [
"pacman",
" apt-get",
" apt",
" dnf"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "17f3e3240b69278621866a83c53efa995fb376bb94c4d384c5d130815f4b5a95",
"md5": "2a3bedcaad2596582f2bd757f5d91c6f",
"sha256": "18595b587304a1ef800d2897cb822b28f392cbe46860444aab6a9c2801cad7dc"
},
"downloads": -1,
"filename": "pkglog-1.31-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2a3bedcaad2596582f2bd757f5d91c6f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 12720,
"upload_time": "2024-06-17T03:47:40",
"upload_time_iso_8601": "2024-06-17T03:47:40.292477Z",
"url": "https://files.pythonhosted.org/packages/17/f3/e3240b69278621866a83c53efa995fb376bb94c4d384c5d130815f4b5a95/pkglog-1.31-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9c8d3ba75c7988159c7761e151d75bfd884bd461a216d80fc9302690b49cc942",
"md5": "b8cc66e0e0270822963b24c76062c267",
"sha256": "2003d95d99f1c68a6e1d8e068a26b85790d778cf74c7e9a366459984685ad9dd"
},
"downloads": -1,
"filename": "pkglog-1.31.tar.gz",
"has_sig": false,
"md5_digest": "b8cc66e0e0270822963b24c76062c267",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 14720,
"upload_time": "2024-06-17T03:47:42",
"upload_time_iso_8601": "2024-06-17T03:47:42.304525Z",
"url": "https://files.pythonhosted.org/packages/9c/8d/3ba75c7988159c7761e151d75bfd884bd461a216d80fc9302690b49cc942/pkglog-1.31.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-17 03:47:42",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "bulletmark",
"github_project": "pkglog",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pkglog"
}