Version Tracker

Version Tracker is a project that provides both a command-line tool and a Python library to query the latest stable versions of different software products using web scrapping.

For example:

$ versiontracker vlc
vlc: 2.2.2 (2016-07-06) @ http://get.videolan.org/vlc/

It is currently being used to detect obsolete packages in Chakra [1] and to feed updated software version information to Wikidata [2].

[1]chakraversiontracker
[2]Shyde

Requirements

Version Tracker requires Python 3 and the following Python packages:

To build the offline documentation, you also need:

And the tools that we use to develop Version Tracker itself also require:

Installation

Use pip to install:

pip install versiontracker

Basic Command-Line Usage

To use the versiontracker command-line application pass it a list of software IDs:

$ versiontracker vlc xfce
vlc: 2.2.2 (2016-07-06) @ http://get.videolan.org/vlc/
xfce: 4.12 (2015-02-28) @ http://archive.xfce.org/xfce/

You can use the -l option to get a list of supported software IDs:

$ versiontracker -l
0ad
4kslideshowmaker
…

Basic Library Usage

Use version_info() to get information about the latest stable version of a single product:

>>> from pprint import pprint
>>> from versiontracker import version_info
>>> pprint(version_info('vlc'))
{'id': 'vlc',
 'date': datetime.datetime(2016, 7, 6, 10, 10),
 'url': 'http://get.videolan.org/vlc/',
 'version': '2.2.2'}

Use iter_version_info() to iterate through the version information of several products:

>>> from versiontracker import iter_version_info
>>> for version_data in iter_version_info(('vlc', 'xfce')):
...     pprint(version_data)
...
{'id': 'vlc',
 'date': datetime.datetime(2016, 7, 6, 10, 10),
 'url': 'http://get.videolan.org/vlc/',
 'version': '2.2.2'}
{'id': 'xfce',
 'date': datetime.datetime(2015, 2, 28, 21, 7),
 'url': 'http://archive.xfce.org/xfce/',
 'version': '4.12'}

Use supported_software() to get a list of supported software IDs:

>>> from versiontracker import supported_software
>>> supported_software()
['kde-l10n-ca', 'kdiamond', 'kontactinterface', 'entropy', …]

Extending Software Support

Version Tracker is not designed to let each user keep their custom software tracking data or code. Changes require you to fork the source code. If you do, we encourage you to send us back your changes so that everyone can benefit from them.

Use the following to clone the Git repository and install in development mode, so that your changes have effect on your system as soon as you save them:

# If you have versiontracker installed:
sudo pip3 uninstall versiontracker

git clone https://gitlab.com/gallaecio/versiontracker.git
cd versiontracker
sudo python3 setup.py develop

You can now work directly on the newly created folder, and whenever you execute versiontracker the code in that folder will be executed.

The following documents describe in details how to extend software support:

  • Extending Software Tracking Data describes how to add new software entries to the data.json file.

    This is how you extend software support, as long as you can use one of the existing spiders for the software that you want to support.

  • Creating a Spider describes how to write your own spider, a Python class that can fetch version information of one or more software products.

Command Line Help

Prints the latest stable version, release date and reference URL of the specified software products.

usage: versiontracker [-h] [-l] [-s SPIDER] [--list-spiders] [-v]
                      [PRODUCT [PRODUCT ...]]
Positional arguments:
products ID of a software product whose latest stable version you want to know. Use -l to get a list of available IDs. If omitted, all supported products are selected.
Options:
-l, --list-ids Lists IDs of supported software products.
-s, --spider

Prints results for all software that uses the specified spider.

Possible choices: bitbucket, sourceforge, mozjs, xpath, opendesktop, http, cuda, cgit, freedroid, github, openbsd, alioth, gitlab, aqbanking, pypi, launchpad, gitweb, hackage, 4k, text, apt, grass, nvidia, kdegit

--list-spiders Lists names of supported spiders.
-v, --version show program’s version number and exit

Tip

The Version Tracker command-line interface supports autocompletion of software IDs and spider names, you just need to activate autocompletion support.

Credits and License

Version Tracker may be used under the terms of the GNU Affero General Public License version 3 or later (AGPLv3+).

For a list of authors who should be credited, see Authors.