#!/usr/local/bin/perl # # dir2html # # Oliver Grau V0.2a 22-SEP-1993 # # Usage: dir2html [-l -o -pre prefix -ov text -t text] directory-list # # Options: # # -l creates links to directory # -o checks if file index.html, welcome.html or overview.html exits and creates link ?? # -pre linkprefix write 'linkprefix before all links # -ov text text for overview link # -t set title/header to 'title' # Examples: WARNING: Arguments must follow the order above !! dir2html -l *.html > t.html dir2html -l -pre '/bla/bli/' -t 'The TEST' *.html *.wrl > t.html ---------------------------------------------------------------------- Here is the source of dir2html.old: #! /bin/sh # Generate hypertext menu from directory list echo "" echo "Information under: $*" echo "" echo "

$*

" # If there is a README file include that as plain text if [ -f $1/README ]; then sed -f txt2html.sed $1/README fi # Now generate a list of links to files echo "" for dir in $* do ( cd $dir for file in *.html *.txt do echo "
  • Title of $file" done ) done echo "
  • "