Update
authorMiguel de Icaza <miguel@gnome.org>
Mon, 13 Dec 2004 01:56:44 +0000 (01:56 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Mon, 13 Dec 2004 01:56:44 +0000 (01:56 -0000)
svn path=/trunk/mono/; revision=37675

mono/docscripts/AgilityPack.dll [new file with mode: 0755]
mono/docscripts/Makefile
mono/docscripts/README
mono/docscripts/convert.cs [new file with mode: 0644]
mono/docscripts/exdoc
mono/docscripts/monoapi.source [new file with mode: 0644]

diff --git a/mono/docscripts/AgilityPack.dll b/mono/docscripts/AgilityPack.dll
new file mode 100755 (executable)
index 0000000..881836d
Binary files /dev/null and b/mono/docscripts/AgilityPack.dll differ
index ed58590ca3c06e464ac4570bc46de9d288fda12a..c448229b3bf978ebd9c40bdc371c5e1b33729398 100644 (file)
@@ -1,2 +1,10 @@
-all:
-       perl exdoc -h . ../*/*.c
\ No newline at end of file
+all: build
+
+build: extract
+       monodoc --assemble --out monoapi --hb toc.xml
+
+extract: convert.exe
+       perl exdoc -h . ../*/*.c
+
+convert.exe: convert.cs AgilityPack.dll
+       mcs convert.cs -r:AgilityPack.dll
\ No newline at end of file
index 058412ae0d157581a425f10df92bdbab310a7b0c..acce4b65da6db559141b1485a43a2fa7a1d269f3 100644 (file)
@@ -55,6 +55,14 @@ PROGRAMS
 
                check mono/metadata/*.c
 
+* convert.cs
+
+       Converts an HTML file into a valid XML document, uses the
+       AgilityPack.dll.  The sources to this DLL live in GNOME CVS
+       module beagle/Filters/AgilityPack.
+
+       A binary is shipped for our convenience.
+
 DATAFILES:
 ---------
 
@@ -68,4 +76,5 @@ DATAFILES:
        public-api 
        wapi
                These two are produced by the produce-lists script
-               and it documents all the public methods.
\ No newline at end of file
+               and it documents all the public methods.
+
diff --git a/mono/docscripts/convert.cs b/mono/docscripts/convert.cs
new file mode 100644 (file)
index 0000000..50680f6
--- /dev/null
@@ -0,0 +1,12 @@
+using HtmlAgilityPack;
+
+class Convert {
+       
+       static void Main (string [] args)
+       {
+               HtmlDocument doc = new HtmlDocument();
+               doc.Load(args [0]);
+               doc.OptionOutputAsXml = true;
+               doc.Save(args [1]);
+       }
+}
index 7f3a8706521eaea870c6f983c13c22aa28dde2f3..a4f3d9d8ee93494335166813226eec8d98c9c337 100644 (file)
@@ -33,8 +33,16 @@ while (<ARGV>){
 if ($html){
     for ($f = 0; $f < $filecount; $f++){
        $name = $files[$f];
-       open (OUT, ">$dir/deploy/$name") || die "Can not create $dir/deploy/$name";
+       open (OUT, "> $dir/html/$name") || die "Can not create $dir/html/$name";
        print "Merging: $name\n";
+       print OUT<<EOF;
+<?xml version="1.0" encoding="utf-8"?>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+   <title>$name</title>
+</head>
+<body>
+EOF
        @a = split (/\n/, $files_content[$f]);
 
        for ($ai = 0; $ai < $#a; $ai++){
@@ -44,23 +52,23 @@ if ($html){
            if ($api ne ""){
 print OUT<<EOF;
 <blockquote>
-    <a name="api:$api">
-                <table class="HeaderTable" width="100%" cellpadding="5">
+    <a name="api:$api"></a>
+                <table summary="" class="HeaderTable" width="100%" cellpadding="5">
                         <tr bgcolor="#b0c4de"><td>
                        <h3 class="api">$api</h3>
-                       </td></tr></table>
-    </a>
+                       </td></tr>
+               </table>
 
     <blockquote>
-                        <table class="SignatureTable" bgcolor="#c0c0c0" cellspacing="0" width="100%">
-                        <tr><td>
-                                <table class="InnerSignatureTalbe" cellpadding="10" cellspacing="0" width="100%">
-                                <tr bgcolor="#f2f2f2"><td>
-    <h4>Prototype: $api</h4>
-                                </td></tr>
-                                </table>
+        <table summary="" class="SignatureTable" bgcolor="#c0c0c0" cellspacing="0" width="100%">
+                <tr><td>
+                        <table summary="" class="InnerSignatureTalbe" cellpadding="10" cellspacing="0" width="100%">
+                        <tr bgcolor="#f2f2f2"><td>
+                       <h4>Prototype: $api</h4>
                         </td></tr>
                         </table>
+               </td></tr>
+       </table>
     </blockquote>
 <p>
 EOF
@@ -69,7 +77,7 @@ EOF
                        print OUT "<blockquote><dl>";
 
                        print OUT "$arguments{$api}\n";
-                       print OUT "</blockquote>";
+                       print OUT "</dl></blockquote>";
                    }
                    if ($returns{$api} ne ""){
                        print OUT "<h4>Returns</h4>";
@@ -83,14 +91,18 @@ EOF
                        print OUT "$bodies{$api}\n";
                        print OUT "</blockquote>";
                    }
-                   print OUT "</td></tr></table>";
                    print OUT "\n";
                     print OUT "</blockquote>";
            } else {
                print OUT "$line\n";
            }
        }
+       print OUT<<EOF;
+</body>
+</html>
+EOF
        close OUT;
+       system ("mono convert.exe $dir/html/$name $dir/deploy/$name");
     }
 }
 
diff --git a/mono/docscripts/monoapi.source b/mono/docscripts/monoapi.source
new file mode 100644 (file)
index 0000000..3c9eb0f
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<monodoc>
+  <source provider="monohb" basefile="monoapi" path="embed"/>
+</monodoc>