[Bio] / FigWebServices / DocDirectory.cgi Repository:
ViewVC logotype

View of /FigWebServices/DocDirectory.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (download) (annotate)
Mon Dec 5 19:12:11 2005 UTC (14 years, 6 months ago) by olson
Branch: MAIN
CVS Tags: caBIG-05Apr06-00, caBIG-13Feb06-00
Changes since 1.5: +17 -0 lines
add license words

#!/usr/bin/perl -w
#
# Copyright (c) 2003-2006 University of Chicago and Fellowship
# for Interpretations of Genomes. All Rights Reserved.
#
# This file is part of the SEED Toolkit.
# 
# The SEED Toolkit is free software. You can redistribute
# it and/or modify it under the terms of the SEED Toolkit
# Public License. 
#
# You should have received a copy of the SEED Toolkit Public License
# along with this program; if not write to the University of Chicago
# at info@ci.uchicago.edu or the Fellowship for Interpretation of
# Genomes at veronika@thefig.info or download a copy from
# http://www.theseed.org/LICENSE.TXT.
#


use FIG;

BEGIN {
    # Print the HTML header.
    print "CONTENT-TYPE: text/html\n\n";
}

=head1 Documentation Directory

This script generates the directory of documentation modules for FIG. The user can
click on a module name and it will automatically pop up the documentation for that
module.

=cut

use strict;
use CGI;
use Tracer;
use PageBuilder;

#my $dir = "$FIG_Config::cgi_base/Html/pod_docs";
#
# I don't see how the above could have worked. Fixing below
#
# RDO
#
# Apparently I mis-interpreted what some of the FIG_Config
# parameters meant. Sorry.
#
# Bruce

my $dir = "$FIG_Config::fig/CGI/Html/pod_docs";
my $links = "";
# Open the documentation directory, and build a table of contents for it.
if (-d $dir) {
    my @files = sort (Tracer::OpenDir($dir, 1));
    for my $file (@files) {
        if ($file =~ /^(.+)\.html$/) {
            my $fileName = $1;
            my $cgi = &FIG::cgi_url(-relative => 1);
            $links .= "<a href=\"$cgi/Html/pod_docs/$file\" target=\"mainFrame\">$fileName</a><br>\n";
        }
    }
    print PageBuilder::Build("<$FIG_Config::fig/CGI/Html/DirectoryTemplate.html",
                             { index => $links });
}

1;

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3