Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Sep 2000 00:36:03 +0100
From:      Mark Ovens <marko@freebsd.org>
To:        doc@freebsd.org
Cc:        Andrew Boothman <andrew@dogma.freebsd-uk.eu.org>
Subject:   Re: Ports Documentation Index - the next installment
Message-ID:  <20000921003603.F1612@parish>
In-Reply-To: <20000906002540.M254@parish>; from marko@freebsd.org on Wed, Sep 06, 2000 at 12:25:40AM %2B0100
References:  <20000906002540.M254@parish>

next in thread | previous in thread | raw e-mail | index | archive | help
I've further enhanced the docsmaker script for those who may be
interested:

	1. Merged ``docsmaker'' and ``docindex.pl'' into one file,
	   which is called ``docindex.pl'' (it seemed the more
	   accurate name of the 2). This also removes the need for the
	   wrapper script. The conditional re-building of the files
	   based on timestamps is (temporarily?) disabled. The script
	   runs sufficiently fast that it may as well re-build
	   everything.

	2. Removed all the debugging print()'s and added progress
	   messages.

	3. Moved the code that attempts to extract a title from HTML
	   docs into a subroutine.

	4. With HTML docs, if there is no <TITLE> tag it now looks for
	   <H1> and <H2> tags (in that order), only falling back to
	   the filename if none of those tags are found. I figured that
	   searching for lower level heading tags would probably
	   result in a less a meaningful title than using the filename.
	   (Suggested by Nik Clayton).

	5. The various paths used and the resulting index file are now
	   stored in variables and code added to allow these to be set
	   as environment variables to override the defaults if your
	   +CONTENTS files and/or FreeBSD docs are in non-standard
	   locations. The variables are:

		$PKG_DIR (default: /var/db/pkg)
		$DOC_DIR (default: /usr/share/doc/en_US.ISO_8859-1)
		$INDEX_FILE (default: /usr/local/share/doc/index.html)

	6. Added some additional annotation (the date/time the index
	   was last rebuilt) and a FreeBSD logo GIF at the top.
	   Suggested by Andrew Boothman (I've left out the doc count
	   as I'm planning to implement that in a different way). The
	   location of the GIF is hard-coded as
	   /usr/local/share/doc/freebsd_title.gif

	7. Added more filetypes to the list of those recognized and
	   re-wrote the code that does this.

	8. Added ``use strict'' which has forced me to tidy up the
	   code :) Also annotated the code.

	9. Added a BSD Licence and copyright notice :)

The new code can be found at
http://ukug.uk.freebsd.org/~mark/docindex.pl and the GIF at
http://ukug.uk.freebsd.org/~mark/freebsd_title.gif 

Enjoy.

-- 
		4.4 - The number of the Beastie
________________________________________________________________
51.44°N  FreeBSD - The Power To Serve http://www.freebsd.org
2.057°W  My Webpage http://ukug.uk.freebsd.org/~mark
mailto:marko@freebsd.org                http://www.radan.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000921003603.F1612>