Date: Wed, 25 Feb 1998 17:57:38 -0500 (EST) From: John Fieber <jfieber@indiana.edu> To: Nate Johnson <nsj@ncsu.edu> Cc: www@FreeBSD.ORG Subject: Re: I'm still alive! =) Message-ID: <Pine.BSF.3.96.980225172907.3416G-100000@fallout.campusview.indiana.edu> In-Reply-To: <199802252132.VAA19738@echo.eos.ncsu.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 25 Feb 1998, Nate Johnson wrote: > I guess that does leave a good question: once I have this thing written, > how would I get something built when the web pages are built? Ie: > > The gallery entries will be stored in a db file of some sort. Make would > need to run a perl script to parse this db and output an sgml file before > the rest of the sgml->html magic happens. Can we do that, or should I > shoot for generating HTML? I would probably do something like: -- cgallery.sgml --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN" [ <!ENTITY date "$Date: 1997/12/20 17:11:51 $"> <!ENTITY title "Gallery - Commercial"> <!ENTITY % includes SYSTEM "includes.sgml"> %includes; <!ENTITY cgallery SYSTEM "cgallery.inc"> ]> <!-- $Id: cgallery.sgml,v 1.22 1997/12/20 17:11:51 nsj Exp $ --> <html> &header; <P>All over the world, FreeBSD is powering innovative Internet applications and services. This gallery is a showcase of commercial organizations who have put Fr eeBSD to work for them. Browse and find out more about what FreeBSD can do for <STRONG>you</STRONG>!</P> <ul> &cgallery; </ul> &footer; </body> </html> ---------------------- Then you have a simple tab delimited flat file database containing fields of category, url, name, description, submitter (email address), date submitted (or added), and for future use by an automated checking script, date last verified. Add to that a perl script that spits selects appropriate category, commercial for example, sorts and spits out entries in the form of <li><a href="$url"><strong>$name</strong> -- $description</a></li> and in the case of recently added entries, throws in an &i.new; (for the "New!" image). For each category it generates a file, such as cgallery.inc, which is referenced in the cgallery.sgml file. The existing sgml -> html mechanism will automagically put it together, validating and normalizing the syntax as it goes (to keep browsers with broken HTML parsers happy). What needs to be added is a Makefile rule for generating the .inc files from the database file, and making the .html files depend on the .inc files in addition to the .sgml files. AND, while on the subject of scripts, I think it is time we move them out of www/data/... to a new directory which I propose should be called www/tools. This would be for scripts used in the building and running of the web site that are too small or to specialized to be put in the ports collection. The Japanese web people have their own tweaked copy of the ports generation script, but I think that could be accomodated in the tools directory with minimal pain. (In fact, the ports script itself could use a re-write, at which point l10n hooks could be put in. I would probably ditch the index file and collect the data directly from a real ports tree. Either that or the index file format needs an overhaul, but I suspect it would be a lot faster to walk the tree with a perl script than use the Makefiles...) -john
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980225172907.3416G-100000>