Portinfo Script

Introduction

The FreeBSD ports collection is a very impressive way for installing third-party software on your FreeBSD machine. You can browse the FreeBSD ports collection here.

The ports collection must be installed on your local machine to use it. Information on installing the ports collection can be found in the FreeBSD Handbook. Once installed on your machine, the ports collection files appear in the file system under /usr/ports/.

For a given piece of software (the port), there is a skeleton of files which are used to build (compile) and install the software. Each port exists in an appropriate category under /usr/ports/

A very good way to browse the ports collection, to see what software is there, is through the online link The FreeBSD Ports Collection. However, if your machine is not always connected to the Internet, this mechanism will be unavailable to you. Thus, I wrote the following Python script to traverse the ports collection directory tree and extract the name and one-line comment from each port. Example output looks like:

[ricci] ~> portinfo.py /usr/ports/astro
SETIsupport      JAVA application that shows current state of seti@home client
dgpsip           Differential GPS over IP communication device
ephem            An interactive terminal-based astronomical ephemeris program
fooseti          GTK+ frontend to SETI@Home
gkrellmearth     A plugin for GKrellM that displays a rotating earth
gkrellmoon       A moon clock plugin for Gkrellm
gkrellmseti      A SETI@home plugin for GKrellM
glunarclock      A GNOME applet which displays the current phase of the Moon
gpsman           A Tcl/Tk-based GPS management utility
jday             Astronomical julian date calculator
ksetispy         Monitors the progress of the SETI@home client
ksetiwatch       A monitoring tool for the seti@home client
...

The script

Download the portinfo.py script.