]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
scripts moved from deal.II tree
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 15 Feb 1999 11:56:47 +0000 (11:56 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 15 Feb 1999 11:56:47 +0000 (11:56 +0000)
git-svn-id: https://svn.dealii.org/trunk@799 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/auto/scripts/addclasses_db.pl [new file with mode: 0644]
deal.II/doc/auto/scripts/index.pl

diff --git a/deal.II/doc/auto/scripts/addclasses_db.pl b/deal.II/doc/auto/scripts/addclasses_db.pl
new file mode 100644 (file)
index 0000000..c691322
--- /dev/null
@@ -0,0 +1,42 @@
+#!/usr/local/bin/perl
+
+# Update Postgres database entries from kdoc sources
+
+use DBI;
+
+$db = DBI->connect("DBI:Pg:dbname=deal",undef,undef);
+
+die $DBI::errstr if (!$db);
+
+print "Connected\n";
+
+$db->do("UPDATE classes SET persistent=FALSE;")
+    || die $db->errstr;
+
+while(<>)
+{
+    next unless(/=/);
+    next if (/\#/);
+    s/=.*//g;
+    chop;
+    print $_, " ";
+
+    # Try to find class name
+
+    $sth = $db->prepare("UPDATE classes set persistent=TRUE where name = '$_';")
+       || die $db->errstr;
+    $sth->execute || die $sth->errstr;
+
+    $rows = $sth->rows;
+    $sth->finish;
+
+    # Insert name if it did not exist.
+
+    if ($rows == 0)
+    {
+       print "insert";
+       
+       $db->do("INSERT INTO classes ( name, display, persistent, manually ) values ( '$_', TRUE, TRUE, FALSE);")|| die $db->errstr;;
+    }
+    print "\n";
+}
index f665dafd0a5d634498f329fbfd1010568c817309..737c09121792c885a861c65bf1b3abe6890151dc 100644 (file)
@@ -11,7 +11,7 @@ while(<>)
        $entry = pop @n;
        while ($#n>=0)
        {
-           $entry .= " in " . pop @n;
+           $entry .= "+" . pop @n;
        }
        $entry .= '=' . $2 . '=' . $library;
        push @entries, $entry;
@@ -28,19 +28,20 @@ print << 'EOT'
 Remark: Lowercase is sorted behind uppercase and destructors are isolated at
 the end.
 <hr>
-<UL>
+<TABLE CELLPADDING=9 CELLSPACING=0 RULES=ROWS BORDER=6>
+<TR><TH><B>function/class</B><TD ALIGN=CENTER><B>in class</B></TR>
 EOT
     ;
 foreach $entry (sort @entries)
 {
     @l = split "=", $entry;
-    
+    @c = split '\+', @l[0];
     @f = split "#", @l[1];
 
-    print "<LI> <A HREF = \"$l[2]/@f[0]\">@l[0]</A>\n";
+    print "<TR><TH ALIGN=left><A HREF = \"$l[2]/@f[0]\">@c[0]</A><TD>@c[1]</TR>\n";
 }
 print << 'EOT'
-</UL>
+</TABLE>
 </BODY>
 </HTML>
 EOT

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.