]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add a script that validates whether cross-references in out documentation are valid...
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 16 Feb 2000 12:44:12 +0000 (12:44 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 16 Feb 2000 12:44:12 +0000 (12:44 +0000)
git-svn-id: https://svn.dealii.org/trunk@2413 0785d39b-7218-0410-832d-ea1e28bc413d

18 files changed:
deal.II/doc/Makefile
deal.II/doc/aural.css [deleted file]
deal.II/doc/auto/scripts/validate-xrefs.pl [new file with mode: 0644]
deal.II/doc/development/Makefile
deal.II/doc/development/index.html
deal.II/doc/development/makefiles.1.html
deal.II/doc/development/navbar.html
deal.II/doc/development/recent-changes.html
deal.II/doc/development/title.html
deal.II/doc/development/toc.html
deal.II/doc/development/writing-documentation.html
deal.II/doc/future.html
deal.II/doc/index.html
deal.II/doc/license.html
deal.II/doc/navbar.html
deal.II/doc/readme.html
deal.II/doc/title.html
deal.II/doc/toc.html

index 9cb5d5f0b69f80986b5aeae4fb692df1f5d321f6..fb646561bab1d778daa049eeaeaad9a4614160a0 100644 (file)
@@ -2,7 +2,7 @@
 
 
 # generic targets
-default: autogen-doc tutorial development
+default: autogen-doc tutorial development validate-xrefs
 
 all: default autogen-doc-all
 
@@ -22,9 +22,15 @@ tutorial:
 development:
        cd development ; $(MAKE)
 
+
+validate-xrefs:
+       @echo "Validating cross-references in HTML files."
+       cd tutorial ; $(MAKE) validate-xrefs
+       cd development ; $(MAKE) validate-xrefs
+
 clean:
        cd auto ; $(MAKE) clean
        cd tutorial ; $(MAKE) clean
        cd development ; $(MAKE) clean
 
-.PHONY: default all autogen-doc autogen-doc-all tutorial clean development
+.PHONY: default all autogen-doc autogen-doc-all tutorial clean development validate-xrefs
diff --git a/deal.II/doc/aural.css b/deal.II/doc/aural.css
deleted file mode 100644 (file)
index 5fc0eca..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-body {}
-
-frameset {}
-
-td {}
-
-dt {}
-
-.figure     {}
-
-.pagetoc    {}
-
-.chapter_title {}
-
-
-span.parhead {}        
-
-span.example {}
-pre.example {}
-table.navbar {}
-
diff --git a/deal.II/doc/auto/scripts/validate-xrefs.pl b/deal.II/doc/auto/scripts/validate-xrefs.pl
new file mode 100644 (file)
index 0000000..78b3a1e
--- /dev/null
@@ -0,0 +1,84 @@
+# $Id$
+# Check whether references in HTML files are valid or 
+# point to non-existing files/links/etc
+#
+# Author: Wolfgang Bangerth, 2000
+
+
+# set this to 1 if you want verbose output
+$debug = 0;
+
+foreach $filename (@ARGV) {
+    open IN, $filename
+        or die "---Can't open file `$filename'\n";
+
+    print "File: $filename\n" if $debug;
+    while (<IN>) {
+        # first find all hrefs
+        while ( /href=\"?(.*?)[\s\"]/g ) {
+           # then decide whether they are relevant for 
+            # our purpose
+           $link = $1;
+    
+           if ( $link =~ /^mailto|http/ ) {
+               # link is external. don't check it
+               print "external link: $link\n" if $debug;
+               next;
+           }
+           elsif ( $link =~ /^#(.*)/ )
+           {
+               # this is a reference within this file. try to 
+               # find its anchor
+               $internal_ref = $1;
+               print "internal reference: $link\n" if $debug;
+           
+               open IN2, $filename;
+               $found = 0;
+               while ( <IN2> ) {
+                   if ( /<a name=\"?(.*?)[\s\"]/ ) {
+                       if ( $1 eq $internal_ref) {
+                           print "                    found.\n" if $debug;
+                           $found = 1;
+                           last;
+                       }
+                   }
+               }
+               
+               die "---Internal reference `$internal_ref' not found in file $filename\n"
+                   unless $found;
+               next;
+           }
+           elsif ( $link =~ /^(.*?)#(.*)/ )
+           {
+               # this is a reference within another file. try to 
+               # find its anchor
+               $external_file = $1;
+               $external_ref = $2;
+               print "external reference: $link\n" if $debug;
+               
+               open IN2, $external_file;
+               $found = 0;
+               while ( <IN2> ) {
+                   if ( /<a name=\"?(.*?)[\s\"]/ ) {
+                       if ( $1 eq $external_ref) {
+                           print "                    found.\n" if $debug;
+                           $found = 1;
+                           last;
+                       }
+                   }
+               }
+               
+               die "---External reference `$internal_ref' not found in file $filename\n"
+                   unless $found;
+               next;
+           }
+           else {
+               # this must now be a regular file which is
+               # referenced. the file must be local
+               die "---Local file `$link' not found in file `$filename'\n"
+                   unless ((-r $link) && (-f $link));
+           }
+               }
+               }
+}
+
index e97b1f5404b5278124d24cfe9f8dd642e7ddc386..ad44877a9daacb572a5e51ab3c9923223a92596a 100644 (file)
@@ -1,3 +1,6 @@
+# $Id$
+
+
 D = ../..
 include $D/common/Make.global_options
 
@@ -43,7 +46,14 @@ makefile.large.html: Makefile.large
        @$(PERL) makefile2html < $< > $@
 
 
+validate-xrefs:
+       $(PERL) $D/doc/auto/scripts/validate-xrefs.pl \
+               $(filter-out makefiles.1.html makefiles.2.html, \
+                 $(shell echo *.html))
+
+
+
 clean:
        -rm -f makefiles.html makefile.small.html makefile.large.html
 
-.PHONY: default clean
+.PHONY: default validate-xrefs clean
index 1f266280ed23d1e4b28a0fa328a8d9193214c4e6..1696f44988312a387027971733dc4688f58fd81e 100644 (file)
@@ -5,7 +5,6 @@
 <title>deal.II Homepage</title>
     <link href="../screen.css" rel="StyleSheet" title="deal.II Homepage" media="screen">
     <link href="../print.css" rel="StyleSheet" title="deal.II Homepage" media="print">
-    <link href="../audio.css" rel="StyleSheet" title="deal.II Homepage" media="aural">
     <meta name="author" content="Wolfgang Bangerth <deal@iwr.uni-heidelberg.de>">
     <meta name="keywords" content="deal.II">
 </head>
index da10719c54826720ba3580f874c15fd00a9874a3..eb7eb6fef0f07b35614a98aeaee4e60cd69411f4 100644 (file)
@@ -4,7 +4,6 @@
   <head>
     <link href="../screen.css" rel="StyleSheet" title="deal.II Homepage" media="screen">
     <link href="../print.css" rel="StyleSheet" title="deal.II Homepage" media="print">
-    <link href="../audio.css" rel="StyleSheet" title="deal.II Homepage" media="aural">
     <title>The deal.II Homepage - Makefiles</title>
     <meta name="author" content="Wolfgang Bangerth <deal@iwr.uni-heidelberg.de>">
     <meta name="keywords" content="deal.II"></head>
index 21cabea19122a658050629300ec14ca1646c9fd7..594f88dd43f506d00303f945decf2c6943d7a0eb 100644 (file)
@@ -5,7 +5,6 @@
 <title>deal.II Homepage</title>
     <link href="../screen.css" rel="StyleSheet" title="deal.II Homepage" media="screen">
     <link href="../print.css" rel="StyleSheet" title="deal.II Homepage" media="print">
-    <link href="../audio.css" rel="StyleSheet" title="deal.II Homepage" media="aural">
     <meta name="author" content="Jan Schrage and others <deal@iwr.uni-heidelberg.de>">
     <meta name="keywords" content="deal.II">
 </head>
index d8bd25c46960ac2c29930e32ae4b05a33981084f..0e03458b708ca14d365b3617923e877ad7a6226f 100644 (file)
@@ -4,7 +4,6 @@
   <head>
     <link href="../screen.css" rel="StyleSheet" title="deal.II Homepage" media="screen">
     <link href="../print.css" rel="StyleSheet" title="deal.II Homepage" media="print">
-    <link href="../audio.css" rel="StyleSheet" title="deal.II Homepage" media="aural">
     <title>The deal.II Homepage</title>
     <meta name="author" content="Wolfgang Bangerth <deal@iwr.uni-heidelberg.de>">
     <meta name="keywords" content="deal.II"></head>
 
     <li> 
       <p>
-      A <a href="auto/cvs-backlog/newdeal.html" target="_top"> backlog
+      A <a href="http://gaia.iwr.uni-heidelberg.de/~deal/auto/cvs-backlog/newdeal.html" target="_top"> backlog
       of changes</a> made to the CVS archive in the last 100 days.
       </p>
 
index 975b75b65a76992e4b3a5589e4b6f57365faa8a0..23e9c65a96a20fcb0f1be0f7d127c2a3b79b624b 100644 (file)
@@ -9,7 +9,6 @@
 <title>deal.II Homepage</title>
     <link href="../screen.css" rel="StyleSheet" title="deal.II Homepage" media="screen">
     <link href="../print.css" rel="StyleSheet" title="deal.II Homepage" media="print">
-    <link href="../audio.css" rel="StyleSheet" title="deal.II Homepage" media="aural">
     <meta name="author" content="Jan Schrage and others <deal@iwr.uni-heidelberg.de>">
     <meta name="keywords" content="deal.II">
 </head>
index bd5e8c38bd03974ba7edbc295d3da8047341eced..bbcc448ff2b2be74ccd955dabb7fb262e0a057d0 100644 (file)
@@ -4,7 +4,6 @@
   <head>
     <link href="../screen.css" rel="StyleSheet" title="deal.II Homepage" media="screen">
     <link href="../print.css" rel="StyleSheet" title="deal.II Homepage" media="print">
-    <link href="../audio.css" rel="StyleSheet" title="deal.II Homepage" media="aural">
     <title>The deal.II Homepage</title>
     <meta name="author" content="Wolfgang Bangerth <deal@iwr.uni-heidelberg.de>">
     <meta name="keywords" content="deal.II"></head>
index 3cbc26a7cd032b59211641b87954e8c05ecd0c18..093d7a85a88edcaf9173702617627c995be7cfdd 100644 (file)
@@ -4,7 +4,6 @@
   <head>
     <link href="../screen.css" rel="StyleSheet" title="deal.II Homepage" media="screen">
     <link href="../print.css" rel="StyleSheet" title="deal.II Homepage" media="print">
-    <link href="../audio.css" rel="StyleSheet" title="deal.II Homepage" media="aural">
     <title>The deal.II Homepage - Makefiles</title>
     <meta name="author" content="Wolfgang Bangerth <deal@iwr.uni-heidelberg.de>">
     <meta name="keywords" content="deal.II"></head>
index dc177871d5785c2e9ef78fc0ec09daaf06f365a4..c85c86146db9c6e7710f745e72a1e00caaa19263 100644 (file)
@@ -4,7 +4,6 @@
   <head>
     <link href="screen.css" rel="StyleSheet" title="deal.II Homepage" media="screen">
     <link href="print.css" rel="StyleSheet" title="deal.II Homepage" media="print">
-    <link href="audio.css" rel="StyleSheet" title="deal.II Homepage" media="aural">
     <title>The deal.II Homepage</title>
     <meta name="author" content="Wolfgang Bangerth <deal@iwr.uni-heidelberg.de>">
     <meta name="keywords" content="deal.II"></head>
index 9aab0307a89ab2968bc31bef4c5cadd0360dcfea..a73ee6f28b562d79379b224bd3f7137856d41a54 100644 (file)
@@ -5,7 +5,6 @@
 <title>deal.II Homepage</title>
     <link href="screen.css" rel="StyleSheet" title="deal.II Homepage" media="screen">
     <link href="print.css" rel="StyleSheet" title="deal.II Homepage" media="print">
-    <link href="audio.css" rel="StyleSheet" title="deal.II Homepage" media="aural">
     <meta name="author" content="Wolfgang Bangerth <deal@iwr.uni-heidelberg.de>">
     <meta name="keywords" content="deal.II">
 </head>
index e332a081737ea203ae8ba0a2a75522613c33cedb..57ab10ac7570d9b41f0a7791f6889b8867db9208 100644 (file)
@@ -4,7 +4,6 @@
   <head>
     <link href="screen.css" rel="StyleSheet" title="deal.II Homepage" media="screen">
     <link href="print.css" rel="StyleSheet" title="deal.II Homepage" media="print">
-    <link href="audio.css" rel="StyleSheet" title="deal.II Homepage" media="aural">
     <title>The deal.II Readme</title>
     <meta name="author" content="Wolfgang Bangerth <deal@iwr.uni-heidelberg.de>">
     <meta name="keywords" content="deal.II"></head>
@@ -49,7 +48,7 @@ thus appropriate for people wishing to write software under the
 model where all source
 code to the software is made available to all users and can be freely
 modified and redistributed. <p> The QPL prohibits development of
-proprietary software. For Qt our <a href="/pricing.html">Qt Professional
+proprietary software. For Qt our <a href="http://www.troll.no/pricing.html">Qt Professional
 Edition</a> product is available for this.
 
   <p>
index 008f5d0fc61228b664ea9c901e0b49fe1f7eed11..430a59735154707b1d85973650c2e0e0e4eefb75 100644 (file)
@@ -5,7 +5,6 @@
 <title>deal.II Homepage</title>
     <link href="screen.css" rel="StyleSheet" title="deal.II Homepage" media="screen">
     <link href="print.css" rel="StyleSheet" title="deal.II Homepage" media="print">
-    <link href="audio.css" rel="StyleSheet" title="deal.II Homepage" media="aural">
     <meta name="author" content="Jan Schrage and others <deal@iwr.uni-heidelberg.de>">
     <meta name="keywords" content="deal.II">
 </head>
index d1ea632956ca09ce3fde44e2f4d0680bea400088..84c1f6e3334aa08eae8643d440d2bb5ce2a662da 100644 (file)
@@ -4,7 +4,6 @@
   <head>
     <link href="screen.css" rel="StyleSheet" title="deal.II Homepage" media="screen">
     <link href="print.css" rel="StyleSheet" title="deal.II Homepage" media="print">
-    <link href="audio.css" rel="StyleSheet" title="deal.II Homepage" media="aural">
     <title>The deal.II Readme</title>
     <meta name="author" content="Wolfgang Bangerth <deal@iwr.uni-heidelberg.de>">
     <meta name="keywords" content="deal.II"></head>
index 99e530f556866452bf1ab76b2476440b7d263f16..3ea3b0ca7c6b0b346bca71b1dafd7e43837db731 100644 (file)
@@ -9,7 +9,6 @@
 <title>deal.II Homepage</title>
     <link href="screen.css" rel="StyleSheet" title="deal.II Homepage" media="screen">
     <link href="print.css" rel="StyleSheet" title="deal.II Homepage" media="print">
-    <link href="audio.css" rel="StyleSheet" title="deal.II Homepage" media="aural">
     <meta name="author" content="Jan Schrage and others <deal@iwr.uni-heidelberg.de>">
     <meta name="keywords" content="deal.II">
 </head>
index e2b25a18046b0e4e84c8bad7739fd19906c71745..9974413deac2a51767a951e5048c2dee13197917 100644 (file)
@@ -4,7 +4,6 @@
   <head>
     <link href="screen.css" rel="StyleSheet" title="deal.II Homepage" media="screen">
     <link href="print.css" rel="StyleSheet" title="deal.II Homepage" media="print">
-    <link href="audio.css" rel="StyleSheet" title="deal.II Homepage" media="aural">
     <title>The deal.II Homepage</title>
     <meta name="author" content="Wolfgang Bangerth <deal@iwr.uni-heidelberg.de>">
     <meta name="keywords" content="deal.II"></head>
@@ -96,7 +95,7 @@
     managing the library, contributing code, and writing
     documentation.
     <a href="http://gaia.iwr.uni-heidelberg.de/~kanschat/" target="_top">Guido
-    Kanschat</a> started contributing advice in the early
+    Kanschat</a> helped with advice in the early
     implementation stages on questions of the design of object-oriented
     finite element software and later joined into the coding.
 

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.