portspage(1)

NAME
portspage - generate html index of a port directory

SYNOPSIS
portspage [options] [directory [port1...portN]]

DESCRIPTION
portspage takes the given port collection and prints an html index on stdout. The port collection is either the first non-option argument, or $PWD if no such argument is given. With one or zero arguments, the complete index is recalculated based on the directory contents at the time of execution (suitable for a cgi script). The value of [directory], if given, will be used verbatim in any HTML links, so provide a relative path if you want the resulting index to be usable in a website. Any subsequent arguments will be interpreted as names of individual ports, allowing you to quickly update a previously-generated index (saved as index.htm*) or to generate a restricted index that shows only the specified ports (if index.htm* does not match anything in [directory]).

OPTIONS

--title=TITLE
    set the page title

--header=FILE
    name of file to insert before port listing

--footer=FILE
    name of file to insert after port listing

--timestamp-accuracy=LEVEL
    0 = no timestamp, 1 = date only, 2 = date and time (default is 1)

Passing --timestamp-accuracy=0 will suppress the "Last modified" column from appearing in the resulting index, both in full-repository mode and quick-update mode. Passing a level greater than 0 in quick-update mode will only recompute the timestamps of ports named on the command line; the timestamps of other ports will be copied verbatim from the previously-generated index. If the existing index.html was generated with --timestamp-accuracy=0, then portspage in quick-update mode will behave as if it saw the same option, regardless of the value given on the command line.

--date-from-file
    take date from newest file instead of directory

--date-from-pkgfile
    take date from Pkgfile instead of directory

--version
    output version information and exit

--help
    show a usage synopsis and exit

EXAMPLES

For local use (not shared on the public www, so absolute paths are acceptable):
    portspage --header=/path/to/portspage.header /usr/ports/mine > /usr/ports/mine/index.html

For an index that you want to share on the public www:
    cd /usr/ports/mine
    portspage --header=/path/to/portspage.header . > index.html

Breaking up the index of a large collection into two separate pages using shell globs:
    cd /usr/ports/mine && rm -f index*.htm*
    portspage --footer=/path/to/footer1 . [a-m]* > index1.html
    portspage --footer=/path/to/footer2 . [n-z]* > index2.html

Fancier (interactive) version of prt-get printf "%i:%n\t%v-%r\t%d\n" | grep -v ^no | cut -d: -f2 , but limited to users who have write permission on /usr/ports/installed:
    pkg_installed && portspage /usr/ports/installed | lynx -stdin

Insert or update an individual port (local use):
    portspage /usr/ports/mine my-updated-port > /usr/ports/mine/index.html.new

Insert or update an individual port (public www):
    cd /usr/ports/mine
    portspage . my-updated-port > index.html.new

FILES
/usr/share/portspage/style.html

Starting with portspage 1.1, the doctype declaration and stylesheet rules have been moved out of the script itself, and are now read from a separate file. You are free to edit this file with your own customizations (only colors, fonts, and header level (1--3), not the names of the classes!), and protect it from being overwritten by creating the appropriate UPGRADE NO directive in pkgadd.conf(5).

AUTHORS
Jukka Heino <jukka@karsikkopuu.net>

John McQuah <jmcquah@disroot.org>

SEE ALSO
ports(8), Pkgfile(5), httpup(8), httpup-repgen(8), pkg-repgen(8)