From owner-freebsd-ports Tue Oct 20 05:54:48 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA12526 for freebsd-ports-outgoing; Tue, 20 Oct 1998 05:54:48 -0700 (PDT) (envelope-from owner-freebsd-ports@FreeBSD.ORG) Received: from mail.cs.tu-berlin.de (mail.cs.tu-berlin.de [130.149.17.13]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA12445; Tue, 20 Oct 1998 05:53:27 -0700 (PDT) (envelope-from wosch@cs.tu-berlin.de) Received: from caramba.cs.tu-berlin.de (wosch@caramba.cs.tu-berlin.de [130.149.17.12]) by mail.cs.tu-berlin.de (8.9.1/8.9.1) with ESMTP id OAA24909; Tue, 20 Oct 1998 14:46:22 +0200 (MET DST) Received: (from wosch@localhost) by caramba.cs.tu-berlin.de (8.9.1/8.9.0) id OAA09426; Tue, 20 Oct 1998 14:46:20 +0200 (MET DST) Message-ID: <19981020144619.A8784@caramba.cs.tu-berlin.de> Date: Tue, 20 Oct 1998 14:46:19 +0200 From: Wolfram Schneider To: Brian Nelson , www@FreeBSD.ORG Cc: ports@FreeBSD.ORG Subject: ports INDEX perl Module (Re: webmastering....) References: <3627B579.65C605F9@notgod.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <3627B579.65C605F9@notgod.com>; from Brian Nelson on Fri, Oct 16, 1998 at 02:07:05PM -0700 Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On 1998-10-16 14:07:05 -0700, Brian Nelson wrote: > I hear from jkh that you may need some assistance. > > I don't have tons of time, but I have developed some perl tools that may > be helpful... document indexing scripts and the like. > > Let me know if you want any help. If anything, I am a warm body that > can post documents, etc. >From my TODO list: We need someone who rewrite our ports INDEX perl scripts. The first step is to write a ports INDEX perl Module. Contact: wosch@freebsd.org 1. A single line in /usr/ports/INDEX looks like: xfig-3.2.2|/usr/ports/graphics/xfig|/usr/X11R6|A drawing program for X11|/usr/ports/graphics/xfig/pkg/DESCR|ports@FreeBSD.ORG|graphics x11|XFree86-3.3.2 Xaw3d-1.3 jpeg-6b xpm-3.4k|XFree86-3.3.2 Xaw3d-1.3 jpeg-6b netpbm-94.3.1 tiff-3.4 transfig-3.2 xpm-3.4k 2. The format is distribution-name|port-path|installation-prefix|comment| \ description-file|maintainer|categories|build deps|run deps 3. The above INDEX line parsed into an anonymous hash object: $port = { DISTRIBUTION_NAME => 'xfig-3.2.2', PORT_PATH => '/usr/ports/graphics/xfig', INSTALLATION_PREFIX => '/usr/X11R6', COMMENT => 'A drawing program for X11', DESCRIPTION_FILE => '/usr/ports/graphics/xfig/pkg/DESCR', MAINTAINER => 'ports@FreeBSD.ORG', CATEGORIES => ['graphics', 'x11'], BUILD_DEPS => ['XFree86-3.3.2', 'Xaw3d-1.3', 'jpeg-6b', 'xpm-3.4k'], RUN_DEPS => ['XFree86-3.3.2', 'Xaw3d-1.3', 'jpeg-6b', 'netpbm-94.3.1', 'tiff-3.4', 'transfig-3.2', 'xpm-3.4k'] }; 4. Now we need some functions: Print a $port object as HTML output Print a $port object as ASCII output Find all objects which are maintained by user XYZ Find all objects which are in category XYZ Find all objects which run/build depend on port XYZ Find all objects which match the string XYZ in DISTRIBUTION_NAME or COMMENT Sort objects by DISTRIBUTION_NAME 5. Finally, modify the cgi script url.cgi, ports.cgi , pds.cgi and the script portindex to use this module. -- Wolfram Schneider http://freebsd.org/~w/ FreeBSD Webmaster To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message