- From: T. V. Raman <raman@Adobe.COM>
- Date: Fri, 10 Jul 1998 08:33:17 -0700 (PDT)
- To: "Leonard R. Kasday" <kasday@acm.org>
- Cc: w3c-wai-ig@w3.org
Hi Len-- Here is a perl script that does what you want. --I created it a while ago to author my own slideshows in HTML-- Simply author your separate html pages, create a file called toc in which you list the files (one per line) in the order you want them linked, and let perl do the rest of the work for you. I'm posting this so you dont inflict powerpoint excreted HTML on us!) ------------------------------------------------------- #!/usr/local/bin/perl #$Id: navigation.pl,v 1.3 1998/06/23 23:30:59 raman Exp $ #Create navigation panel for linked documents #Usage: perl navigation-panel.pl < toc sub getNavigationPanel { my ( $next, $prev, $contents) =@_; $previous = $contents unless defined ($previous); $next = $contents unless defined ($next); my $n = "<A HREF=\"$next\">Next</A> "; my $p = "<A HREF=\"$prev\">Previous</A> "; my $c = "<A HREF=\"$contents\">Contents</A> "; return $n.$p.$c; } #Read in the ordered list of files #and update each file to have a navigation panel at top and #bottom. my @toc = <>; chomp (@toc); my $contents = $toc[0]; my $i; foreach $i (0..$#toc){ my $this = $toc[$i]; my $next =$toc[$i+1]; my $prev = $toc[$i-1] if ($i > 0); my $panel = getNavigationPanel ( $next, $prev, $contents); rename ($this, $this.".bak"); open (INPUT, "$this.bak") or die "Could not read $this.bak $!"; open (OUTPUT, ">$this") or die "Could not open $this for writing $!"; while (<INPUT>) { s@<body>.*$@<body>$panel@; s@^.*</body>$@<P>$panel</body>@; print OUTPUT $_; } close (INPUT); close (OUTPUT); } -- Best Regards, --raman Adobe Systems Tel: 1 (408) 536 3945 (W14-612) Advanced Technology Group Fax: 1 (408) 537 4042 (W14 129) 345 Park Avenue Email: raman@adobe.com San Jose , CA 95110 -2704 Email: raman@cs.cornell.edu http://labrador.corp.adobe.com/~raman/ (Adobe Intranet) http://cs.cornell.edu/home/raman/raman.html (Cornell) ---------------------------------------------------------------------- Disclaimer: The opinions expressed are my own and in no way should be taken as representative of my employer, Adobe Systems Inc. ____________________________________________________________ -- Best Regards, --raman Adobe Systems Tel: 1 (408) 536 3945 (W14-612) Advanced Technology Group Fax: 1 (408) 537 4042 (W14 129) 345 Park Avenue Email: raman@adobe.com San Jose , CA 95110 -2704 Email: raman@cs.cornell.edu http://labrador.corp.adobe.com/~raman/ (Adobe Intranet) http://cs.cornell.edu/home/raman/raman.html (Cornell) ---------------------------------------------------------------------- Disclaimer: The opinions expressed are my own and in no way should be taken as representative of my employer, Adobe Systems Inc. ____________________________________________________________
Received on Friday, 10 July 1998 11:32:49 UTC