#!/usr/bin/perl # Copyright (c) June 1998 Wolfram Schneider , Berlin. # # site - create automatically a site map # # Format: | # An empty url begin a new section # # $FreeBSD$ # The FreeBSD French Documentation Project # Original revision: 1.3 # print a dl list #
foo
#
bla,foo,bar
#
sub dl { $menu = 0; print "
\n"; while(<>) { # ignore comments and empty lines next if /^\s*#/; next if /^\s*$/; chop; ($url, $description) = split('\|'); $description =~ s/^\s+//; $description =~ s/\s+$//; # new section if (!$url && $description) { # close last
if ($menu) { print "\n", "
\n", "\n"; } $menu = 1; print "
", $description, "
\n"; print "
\n"; } # entries for a section elsif ($menu) { # a comma execpt for the last entry print ",\n" if ($menu > 1); print " ', $description, ""; $menu++; } } print "\n", "
\n"; print "
\n"; } &dl;