#!/usr/bin/perl # # Format XHTML generated by rdoc (via tidy) for websites # # Usage: rdoc .... # for f in `find outdir -name \*.html -print`; # tidy ... $f | fix-rdoc-xhtml $f.new && mv $f.new $f; # donek OUTPUT-FILE # # Copyright (C) 2001-2005 David Beckett - http://www.dajobe.org/ # Copyright (C) 2001-2005 University of Bristol - http://www.bristol.ac.uk/ # use strict; use File::Basename; my $progname=basename $0; my $main_title="Redland RDF Language Bindings - Ruby RDoc"; die "USAGE: $progname OUTPUT-FILE\n" if @ARGV < 1; my($file)=@ARGV; my $is_index = ($file =~ /(fr_file_index|fr_class_index|fr_method_index)/); open(OUT, ">$file") or die "$progname: Cannot create $file - $!\n"; open(IN, "-"); while() { if(m%(.*?)%) { s%(.*?)%$main_title - $1%; } if(m%%) { print OUT; print OUT <<"EOT" if !$is_index;
EOT next; } next if /^\n}; } if(m%"validator-badges"%) { while() { last if m%
%; } next; } my $year=1900+(localtime)[5]; if(m%^%) { print OUT <<"EOT";
EOT print OUT <<"EOT" if !$is_index;
Go to Redland Home - Language Bindings Home - Ruby API Home
EOT print OUT <<"EOT";

(C) Copyright 2004-$year Dave Beckett, (C) Copyright 2004-2005 University of Bristol

EOT } print OUT; } close(IN); close(OUT);