From: schrage Date: Thu, 1 Jul 1999 13:09:54 +0000 (+0000) Subject: File lists as TeX-table, first check-in X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3c8e72318b1eadb285d5b4b9ac8d6450fe91082;p=dealii-svn.git File lists as TeX-table, first check-in git-svn-id: https://svn.dealii.org/trunk@1521 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/doc/tutorial/scripts/filelist.pl b/deal.II/doc/tutorial/scripts/filelist.pl new file mode 100755 index 0000000000..0c5b4c75a4 --- /dev/null +++ b/deal.II/doc/tutorial/scripts/filelist.pl @@ -0,0 +1,66 @@ +#!/usr/local/bin/perl + +# Takes table title as argument, traverses the files in . +# and writes to STDOUT a list of all files +# as a TeX-table, with modification date and revision number. +# Jan Schrage 1999 + +use File::Find; +use File::stat; +use Time::localtime; + +unless ($ARGV[0]) { $ttitle="{\tt deal.II} tutorial"; } +else { $ttitle=$ARGV[0];} + +@ignore=("CVS","/#.*#",".*~","^[./]*\$","\.#"); + +tablehead($ttitle); +find(\&process,"."); +tablefoot(); + +sub process { + local ($what=""); + local ($last_rev,$rev,$line,@parts,@cvsout); + + $what=$File::Find::dir."/".$_; + + foreach $i (@ignore) { + if ($what =~ $i) {return;} + } + + @cvsout=`cvs status $what`; + + $last_rev=ctime(stat($what)->mtime); + + + while ($line=shift(@cvsout)) + { + if ($line =~ "Working revision:" ) + { + @parts=split(/:\w*/,$line); + $rev=@parts[1]; + + print $what." &".$last_rev." &".$rev; + } + } + +} + +sub tablehead { + local ($what=$_); + + print +"%% Table compiled by filelist.pl +%% Jan Schrage 1999 +\\begin{table} +\\caption{Directory listing of $ttitle} +\\begin{tabular}[l r r] +File & Last change & Revision number \\\\ +\\hrule \n"; +} + + +sub tablefoot { + print "\\end{table} \n"; +} +