#use wml::fmt::sdf #use wml::std::grid <: sub get_wml_subject { my ($file) = @_; open(FILE,$file); my $subject = ; close(FILE); return undef if ($subject !~ /.*<\s*subject\s*(.*)\s*>.*/); $subject =~ s/.*<\s*subject\s*(.*)\s*>.*/$1/; $subject =~ s/^"(.*)"$/$1/; $subject =~ s/^'(.*)'$/$1/; return $subject; } sub add_wml_menu_entry { my ($dir,$style,$order) = @_; my $file ="$dir/index.wml"; my $subj = get_wml_subject($file); if (defined $subj) { if ($order) { print "
$subj\n"; } else { print "
$subj\n"; } } } sub get_wml_subdirectories { my ($dir) = @_; opendir(DIR,$dir); my (@dir) = grep(!/^\./ && -d "$dir/$_" && !/CVS/ && ! -l "$dir/$_", readdir(DIR)); closedir(DIR); return @dir; } :>
{#SUBJECT_LOC#}
{#HEADER#}
A picture of Blaise Gassend
{#SUBJECT_LOC#}

by Blaise Gassend

<: { my $entry = ""; while ($entry =~ /\.\./) { $break++; add_wml_menu_entry($entry, "parentmenuentry", 0); if ($entry eq "..") { $entry = "." } else { $entry =~ s/\.\.\/// } } add_wml_menu_entry($entry, "currentmenuentry", 0); my @children = get_wml_subdirectories("."); foreach my $ndir (@children) { add_wml_menu_entry("$ndir", "childmenuentry", 0); } } :>

{#BODY#}

{#FOOTER#} This page was generated by the Website META Language by Ralf S. Engelschall from this source.
© 2003-2004 Blaise Gassend. All rights reserved. {#NEDSTAT#}
{#SUBJECT_LOC#:%0:##} {#BODY#: