Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Feb 2010 22:45:19 +0000
From:      Anton Shterenlikht <mexas@bristol.ac.uk>
To:        Nathan Vidican <nathan@vidican.com>
Cc:        Daniel Molina Wegener <dmw@coder.cl>, Anton Shterenlikht <mexas@bristol.ac.uk>, freebsd-questions@freebsd.org, Bill Moran <wmoran@potentialtech.com>
Subject:   Re: creating htmls from a directory tree?
Message-ID:  <20100210224519.GP58179@mech-cluster241.men.bris.ac.uk>
In-Reply-To: <795fc2b81002100859s2bba2d61nec5c85524dc248bc@mail.gmail.com>
References:  <20100210150330.GC58179@mech-cluster241.men.bris.ac.uk> <20100210100536.150614a1.wmoran@potentialtech.com> <20100210151102.GD58179@mech-cluster241.men.bris.ac.uk> <201002101235.17641.dmw@coder.cl> <20100210163756.GJ58179@mech-cluster241.men.bris.ac.uk> <795fc2b81002100859s2bba2d61nec5c85524dc248bc@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Feb 10, 2010 at 11:59:32AM -0500, Nathan Vidican wrote:
> Could do something simple with a Perl script as such:
> 
> #!/usr/bin/perl
> 
> use strict;
> my @filenames = `ls`;
> 
> print "Content-type: text/html\n\n";
> 
> print "See the list below, click an item to open it: <br>\n<lui>\n";
> foreach my $F (@files) {
>   print "  <li><a href=\"$F\">$F</a></li>\n";
> }
> print "</lui>\n";
> 
> # EOF
> 
> You could, of course, get much fancier as it goes - but that's the quick and
> dirty of doing it with a simple cgi script anyways.

many thanks
anton


-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 331 5944
Fax: +44 (0)117 929 4423



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100210224519.GP58179>