verwatch
is a python library and CLI tool for monitoring versions of
software packages at various sources like git
or rpm
repositories.
Packagers and maintainers might find this tool helpful, especially when maintaining packages at multiple repositories and versions.
This software is being created at the moment, help me hack it!
- fetch versions:
git
(latest version tag)distgit
(RPM specfile version in git)repoquery
(query rpm repos)bodhi
(Fedora updates)koji
(Fedora build system, brew also works)
- save versions locally and query them offline
- use colors to mark latest/old versions
- HTML output (whole page or just embeddable/stylable tags)
- tree version structure: package -> release -> repo -> branch
- supports multiple package configurations
- filter listed/updated packages and releases using regexp (easy selective update)
- easily write, plug in and contribute custom version fetchers
- distgit fetcher example
- better documentation?
- automatic update on old cache?
- tests?
Following python
packages are required:
docopt
for beautiful option parsingblessings
for funky colors
I hacked it up on python 2.7.
See examples
folder for sample package configurations.
examples/README.md
explains where to put them and how to use them.
There is verw
CLI frontend. Some use cases:
verw
: lists versions for default packages.verw -u
: updates and shows versions for default packages.verw -p clients
: use~/.verwatch/packages/clients.json
package config.verw 'nova|cinder'
: show versions of packages matching supplied regex.verw -U -r 'grizzly' 'nova|cinder'
: update versions/releases of packages matching supplied regexes and exit.
For library usage, see shell.py
.
# your package manager or at least `pip` are better choices for installing
# python packages, but `easy_install` Just Works (TM)
sudo easy_install blessings docopt
git clone https://github.com/yac/verwatch.git
cd verwatch
sudo python setup.py install
mkdir -p ~/.verwatch/packages
cp examples/nova.json ~/.verwatch/packages
cd ~/.verwatch/packages
ln -s nova.json default.json
verw
Long story short:
- Copy a builtin fetcher of your choice from
verwatch/fetchers
to~/.verwatch/plugins
. - Modify to your needs. Check out
verwatch/fetch.py:VersionFetcher
for moar info. - ???
- Profit!
~/.verwatch/plugins/*.py
are loaded automatically and any subclasses of
verwatch.fetch.VersionFetcher
are registered as version fetchers.
To use your shiny new fetcher, just reference it in package configuration by
its name
.