Create the site map with a perl script.

This commit is contained in:
Wolfram Schneider 1998-06-05 10:07:18 +00:00
parent c461d367f8
commit 477de7dc88
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/www/; revision=2893
8 changed files with 216 additions and 92 deletions

View file

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.30 1998-06-02 17:12:33 wosch Exp $
# $Id: Makefile,v 1.31 1998-06-05 10:07:16 wosch Exp $
.if exists(Makefile.conf)
.include "Makefile.conf"
@ -19,7 +19,7 @@ DOCS+= newsflash.sgml npgallery.sgml pgallery.sgml publish.sgml search.sgml
DOCS+= searchhints.sgml send-pr.sgml security.sgml support.sgml where.sgml
DOCS+= resignation.sgml y2kbug.sgml search-mid.sgml press.sgml
CLEANFILES+=atoz.sgml
CLEANFILES+=atoz.sgml site.sgml
# These will be directly installed.
@ -42,10 +42,13 @@ stats-img.html: ${ACCESS_LOG_DIR}/${ACCESS_LOG_FILE}
cat ${ACCESS_LOG_FILE}) | \
${ANALOG} +i0 +R500 -o > ${.TARGET}
index-site.sgml: atoz.sgml
index-site.sgml: atoz.sgml site.sgml
atoz.sgml: web.atoz
sort -fu web.atoz | perl atoz.pl > ${.TARGET}
site.sgml: site.map
./site.pl < ${.ALLSRC} > ${.TARGET}
cgallery.html: cgallery.sgml cgallery.inc
cgallery.inc: gallery.db gengallery.pl
./gengallery.pl commercial gallery.db > cgallery.inc

View file

@ -1,56 +1,17 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN" [
<!ENTITY date "$Date: 1998-05-27 08:01:19 $">
<!ENTITY date "$Date: 1998-06-05 10:07:16 $">
<!ENTITY title "Site Map and Index of http://www.FreeBSD.org">
<!ENTITY % includes SYSTEM "includes.sgml"> %includes;
<!ENTITY atoz SYSTEM "atoz.sgml">
<!ENTITY site SYSTEM "site.sgml">
]>
<!-- $Id: index-site.sgml,v 1.14 1998-05-27 08:01:19 wosch Exp $ -->
<!-- $Id: index-site.sgml,v 1.15 1998-06-05 10:07:16 wosch Exp $ -->
<html>
&header;
<h1>Site Map</h1>
<dl>
<DT><STRONG>Software</STRONG></dt>
<DD>
<a href="availability.html">About FreeBSD</a>,
<a href="features.html">Features</a>,
<a href="releases/">Releases</a>,
<a href="handbook/install.html">Installation</a>,
<a href="handbook/install:hw.html">Supported Hardware</a>,
<a href="handbook/mirrors.html">Mirrors</a>,
<a href="applications.html">Applications</a>,
<a href="ports/">Ports</a>,
<a href="commercial.html">Commercial Vendors</a>
</dd>
<DT><STRONG>Support</STRONG></dt>
<DD>
<a href="support.html#mailing-list">Mailing lists</a>,
<a href="support.html#newsgroups">Newsgroups</a>,
<a href="support.html#web">Web</a>,
<a href="support.html#pr">Bugs</a>,
<a href="support.html#cvs">CVS</a>,
<a href="support.html#development">Projects</a>,
<a href="support.html#user">User Groups</a>
</dd>
<DT><STRONG>Documentation</STRONG></dt>
<DD>
<a href="newsflash.html">Newsflash</a>,
<a href="press.html">FreeBSD in the press</a>,
<a href="handbook/">Handbook</a>,
<a href="FAQ/">FAQ</a>,
<a href="tutorials/">Tutorials</a>,
<a href="docs.html#man">Manual Pages</a>,
<a href="docs.html#info">INFO</a>,
<a href="docs.html#44doc">4.4BSD Manuals</a>,
<a href="publish.html">Publications</a>,
<a href="handbook/bibliography.html">Books</a>,
<a href="y2kbug.html">Year2000</a>,
<!-- <a href="docs.html#">Non-English</a> -->
</dd>
</dl>
&site;
<HR NOSHADE>

43
data/site.map Normal file
View file

@ -0,0 +1,43 @@
# Copyright (c) June 1998 Wolfram Schneider <wosch@FreeBSD.org>, Berlin.
#
# Site map for FreeBSD.org
#
# Empty lines and comments ('#') are ignored.
# Format: <url> | <description>
# An empty url begin a new section
#
# $Id: site.map,v 1.1 1998-06-05 10:07:18 wosch Exp $
|Software
availability.html|About FreeBSD
features.html|Features
releases/|Releases
handbook/install.html|Installation
handbook/install:hw.html|Supported Hardware
handbook/mirrors.html|Mirrors
applications.html|Applications
ports/|Ports
commercial.html|Commercial Vendors
|Support
support.html#mailing-list|Mailing lists
support.html#newsgroups|Newsgroups
support.html#web|Web
support.html#pr|Bugs
support.html#cvs|CVS
support.html#development|Projects
support.html#user|User Groups
|Documentation
newsflash.html|Newsflash
press.html|FreeBSD in the press
handbook/|Handbook
FAQ/|FAQ
tutorials/|Tutorials
docs.html#man|Manual Pages
docs.html#info|INFO
docs.html#44doc|4.4BSD Manuals
publish.html|Publications
handbook/bibliography.html|Books
y2kbug.html|Year2000

55
data/site.pl Executable file
View file

@ -0,0 +1,55 @@
#!/usr/bin/perl
# Copyright (c) June 1998 Wolfram Schneider <wosch@FreeBSD.org>, Berlin.
#
# site - create automatically a site map
#
# Format: <url> | <description>
# An empty url begin a new section
#
# $Id: site.pl,v 1.1 1998-06-05 10:07:17 wosch Exp $
# print a dl list
# <dl><dt>foo</dt>
# <dd>bla,foo,bar</dd>
# </dl>
sub dl {
$menu = 0;
print "<DL>\n";
while(<>) {
# ignore comments and empty lines
next if /^\s*#/;
next if /^\s*$/;
chop;
($url, $description) = split('\|');
# new section
if (!$url && $description) {
# close last <dd>
if ($menu) {
print "\n", " </DD>\n", "\n";
}
$menu = 1;
print " <DT><STRONG>", $description, "</STRONG></DT>\n";
print " <DD>\n";
}
# entries for a section
elsif ($menu) {
# a comma execpt for the last entry
print ",\n" if ($menu > 1);
print " <A HREF=", '"', $url, '">', $description, "</A>";
$menu++;
}
}
print "\n", " </DD>\n";
print "</DL>\n";
}
&dl;

View file

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.30 1998-06-02 17:12:33 wosch Exp $
# $Id: Makefile,v 1.31 1998-06-05 10:07:16 wosch Exp $
.if exists(Makefile.conf)
.include "Makefile.conf"
@ -19,7 +19,7 @@ DOCS+= newsflash.sgml npgallery.sgml pgallery.sgml publish.sgml search.sgml
DOCS+= searchhints.sgml send-pr.sgml security.sgml support.sgml where.sgml
DOCS+= resignation.sgml y2kbug.sgml search-mid.sgml press.sgml
CLEANFILES+=atoz.sgml
CLEANFILES+=atoz.sgml site.sgml
# These will be directly installed.
@ -42,10 +42,13 @@ stats-img.html: ${ACCESS_LOG_DIR}/${ACCESS_LOG_FILE}
cat ${ACCESS_LOG_FILE}) | \
${ANALOG} +i0 +R500 -o > ${.TARGET}
index-site.sgml: atoz.sgml
index-site.sgml: atoz.sgml site.sgml
atoz.sgml: web.atoz
sort -fu web.atoz | perl atoz.pl > ${.TARGET}
site.sgml: site.map
./site.pl < ${.ALLSRC} > ${.TARGET}
cgallery.html: cgallery.sgml cgallery.inc
cgallery.inc: gallery.db gengallery.pl
./gengallery.pl commercial gallery.db > cgallery.inc

View file

@ -1,56 +1,17 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN" [
<!ENTITY date "$Date: 1998-05-27 08:01:19 $">
<!ENTITY date "$Date: 1998-06-05 10:07:16 $">
<!ENTITY title "Site Map and Index of http://www.FreeBSD.org">
<!ENTITY % includes SYSTEM "includes.sgml"> %includes;
<!ENTITY atoz SYSTEM "atoz.sgml">
<!ENTITY site SYSTEM "site.sgml">
]>
<!-- $Id: index-site.sgml,v 1.14 1998-05-27 08:01:19 wosch Exp $ -->
<!-- $Id: index-site.sgml,v 1.15 1998-06-05 10:07:16 wosch Exp $ -->
<html>
&header;
<h1>Site Map</h1>
<dl>
<DT><STRONG>Software</STRONG></dt>
<DD>
<a href="availability.html">About FreeBSD</a>,
<a href="features.html">Features</a>,
<a href="releases/">Releases</a>,
<a href="handbook/install.html">Installation</a>,
<a href="handbook/install:hw.html">Supported Hardware</a>,
<a href="handbook/mirrors.html">Mirrors</a>,
<a href="applications.html">Applications</a>,
<a href="ports/">Ports</a>,
<a href="commercial.html">Commercial Vendors</a>
</dd>
<DT><STRONG>Support</STRONG></dt>
<DD>
<a href="support.html#mailing-list">Mailing lists</a>,
<a href="support.html#newsgroups">Newsgroups</a>,
<a href="support.html#web">Web</a>,
<a href="support.html#pr">Bugs</a>,
<a href="support.html#cvs">CVS</a>,
<a href="support.html#development">Projects</a>,
<a href="support.html#user">User Groups</a>
</dd>
<DT><STRONG>Documentation</STRONG></dt>
<DD>
<a href="newsflash.html">Newsflash</a>,
<a href="press.html">FreeBSD in the press</a>,
<a href="handbook/">Handbook</a>,
<a href="FAQ/">FAQ</a>,
<a href="tutorials/">Tutorials</a>,
<a href="docs.html#man">Manual Pages</a>,
<a href="docs.html#info">INFO</a>,
<a href="docs.html#44doc">4.4BSD Manuals</a>,
<a href="publish.html">Publications</a>,
<a href="handbook/bibliography.html">Books</a>,
<a href="y2kbug.html">Year2000</a>,
<!-- <a href="docs.html#">Non-English</a> -->
</dd>
</dl>
&site;
<HR NOSHADE>

43
en/search/site.map Normal file
View file

@ -0,0 +1,43 @@
# Copyright (c) June 1998 Wolfram Schneider <wosch@FreeBSD.org>, Berlin.
#
# Site map for FreeBSD.org
#
# Empty lines and comments ('#') are ignored.
# Format: <url> | <description>
# An empty url begin a new section
#
# $Id: site.map,v 1.1 1998-06-05 10:07:18 wosch Exp $
|Software
availability.html|About FreeBSD
features.html|Features
releases/|Releases
handbook/install.html|Installation
handbook/install:hw.html|Supported Hardware
handbook/mirrors.html|Mirrors
applications.html|Applications
ports/|Ports
commercial.html|Commercial Vendors
|Support
support.html#mailing-list|Mailing lists
support.html#newsgroups|Newsgroups
support.html#web|Web
support.html#pr|Bugs
support.html#cvs|CVS
support.html#development|Projects
support.html#user|User Groups
|Documentation
newsflash.html|Newsflash
press.html|FreeBSD in the press
handbook/|Handbook
FAQ/|FAQ
tutorials/|Tutorials
docs.html#man|Manual Pages
docs.html#info|INFO
docs.html#44doc|4.4BSD Manuals
publish.html|Publications
handbook/bibliography.html|Books
y2kbug.html|Year2000

55
en/search/site.pl Executable file
View file

@ -0,0 +1,55 @@
#!/usr/bin/perl
# Copyright (c) June 1998 Wolfram Schneider <wosch@FreeBSD.org>, Berlin.
#
# site - create automatically a site map
#
# Format: <url> | <description>
# An empty url begin a new section
#
# $Id: site.pl,v 1.1 1998-06-05 10:07:17 wosch Exp $
# print a dl list
# <dl><dt>foo</dt>
# <dd>bla,foo,bar</dd>
# </dl>
sub dl {
$menu = 0;
print "<DL>\n";
while(<>) {
# ignore comments and empty lines
next if /^\s*#/;
next if /^\s*$/;
chop;
($url, $description) = split('\|');
# new section
if (!$url && $description) {
# close last <dd>
if ($menu) {
print "\n", " </DD>\n", "\n";
}
$menu = 1;
print " <DT><STRONG>", $description, "</STRONG></DT>\n";
print " <DD>\n";
}
# entries for a section
elsif ($menu) {
# a comma execpt for the last entry
print ",\n" if ($menu > 1);
print " <A HREF=", '"', $url, '">', $description, "</A>";
$menu++;
}
}
print "\n", " </DD>\n";
print "</DL>\n";
}
&dl;