]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
File lists as TeX-table, first check-in
authorschrage <schrage@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 1 Jul 1999 13:09:54 +0000 (13:09 +0000)
committerschrage <schrage@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 1 Jul 1999 13:09:54 +0000 (13:09 +0000)
git-svn-id: https://svn.dealii.org/trunk@1521 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/tutorial/scripts/filelist.pl [new file with mode: 0755]

diff --git a/deal.II/doc/tutorial/scripts/filelist.pl b/deal.II/doc/tutorial/scripts/filelist.pl
new file mode 100755 (executable)
index 0000000..0c5b4c7
--- /dev/null
@@ -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 <schrage@gaia.iwr.uni-heidelberg.de> 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 <schrage\@gaia.iwr.uni-heidelberg.de> 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";
+}
+

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.