[svn:parrot] r37229 - in trunk: . lib/Parrot/Docs lib/Parrot/Docs/Section

allison at svn.parrot.org allison at svn.parrot.org
Mon Mar 9 04:39:02 UTC 2009


Author: allison
Date: Mon Mar  9 04:39:01 2009
New Revision: 37229
URL: https://trac.parrot.org/parrot/changeset/37229

Log:
[doc] Reorganize the documentation navigation pages for sanity,
partially inspired by the doc navigation on the old parrotcode.org site.
Modify the HTML generation modules to accept a version number and
display it in the title bar and footer of generated pages when passed.
Also suppress the "Errata" section, so Pod parsing errors won't be
displayed in generated docs.

Added:
   trunk/lib/Parrot/Docs/Section/Developer.pm
   trunk/lib/Parrot/Docs/Section/PDDs.pm
Deleted:
   trunk/lib/Parrot/Docs/Section/Docs.pm
   trunk/lib/Parrot/Docs/Section/DynaPMCs.pm
   trunk/lib/Parrot/Docs/Section/EditorPlugins.pm
Modified:
   trunk/MANIFEST
   trunk/lib/Parrot/Docs/File.pm
   trunk/lib/Parrot/Docs/Group.pm
   trunk/lib/Parrot/Docs/HTMLPage.pm
   trunk/lib/Parrot/Docs/Item.pm
   trunk/lib/Parrot/Docs/Section.pm
   trunk/lib/Parrot/Docs/Section/Ops.pm
   trunk/lib/Parrot/Docs/Section/PMCs.pm
   trunk/lib/Parrot/Docs/Section/Parrot.pm
   trunk/lib/Parrot/Docs/Section/Tools.pm

Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST	Mon Mar  9 04:26:08 2009	(r37228)
+++ trunk/MANIFEST	Mon Mar  9 04:39:01 2009	(r37229)
@@ -1,7 +1,7 @@
 # ex: set ro:
 # $Id$
 #
-# generated by tools/dev/mk_manifest_and_skip.pl Sun Mar  8 01:52:44 2009 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Mon Mar  9 04:26:37 2009 UT
 #
 # See tools/dev/install_files.pl for documentation on the
 # format of this file.
@@ -1795,15 +1795,14 @@
 lib/Parrot/Docs/Section/C.pm                                [devel]lib
 lib/Parrot/Docs/Section/Compilers.pm                        [devel]lib
 lib/Parrot/Docs/Section/Config.pm                           [devel]lib
-lib/Parrot/Docs/Section/Docs.pm                             [devel]lib
-lib/Parrot/Docs/Section/DynaPMCs.pm                         [devel]lib
-lib/Parrot/Docs/Section/EditorPlugins.pm                    [devel]lib
+lib/Parrot/Docs/Section/Developer.pm                        [devel]lib
 lib/Parrot/Docs/Section/Examples.pm                         [devel]lib
 lib/Parrot/Docs/Section/IMCC.pm                             [devel]lib
 lib/Parrot/Docs/Section/Info.pm                             [devel]lib
 lib/Parrot/Docs/Section/Languages.pm                        [devel]lib
 lib/Parrot/Docs/Section/Libs.pm                             [devel]lib
 lib/Parrot/Docs/Section/Ops.pm                              [devel]lib
+lib/Parrot/Docs/Section/PDDs.pm                             [devel]lib
 lib/Parrot/Docs/Section/PMCs.pm                             [devel]lib
 lib/Parrot/Docs/Section/Parrot.pm                           [devel]lib
 lib/Parrot/Docs/Section/Perl.pm                             [devel]lib

Modified: trunk/lib/Parrot/Docs/File.pm
==============================================================================
--- trunk/lib/Parrot/Docs/File.pm	Mon Mar  9 04:26:08 2009	(r37228)
+++ trunk/lib/Parrot/Docs/File.pm	Mon Mar  9 04:39:01 2009	(r37229)
@@ -293,6 +293,7 @@
 
     if ( $self->contains_pod ) {
         my $formatter = Parrot::Docs::POD2HTML->new;
+        $formatter->no_errata_section(1); # don't dump errors into HTML output
 
         $self->{POD_HTML} = $formatter->html_for_file($self);
     }

Modified: trunk/lib/Parrot/Docs/Group.pm
==============================================================================
--- trunk/lib/Parrot/Docs/Group.pm	Mon Mar  9 04:26:08 2009	(r37228)
+++ trunk/lib/Parrot/Docs/Group.pm	Mon Mar  9 04:39:01 2009	(r37229)
@@ -63,7 +63,9 @@
     # RT#43709 - Groups should only contain items or paths.
 
     $self = $self->SUPER::new( $text, @contents );
-    $self->{NAME} = $name;
+    $self->{NAME}  = $name;
+    $self->{TITLE} = $name;
+    $self->{PATH}  = $text;
 
     return $self;
 }
@@ -86,6 +88,18 @@
     return $self->{NAME};
 }
 
+=item C<version()>
+
+Returns the documentation version number.
+
+=cut
+
+sub version {
+    my $self = shift;
+
+    return $self->{VERSION};
+}
+
 =item C<html_link()>
 
 Groups have no HTML link. This method returns an empty string which will
@@ -110,17 +124,7 @@
     my $index_html = $self->write_contents_html(@_);
 
     if ($index_html) {
-
-        # If none of the items are in a para then the whole group is.
-
-        if ( $index_html !~ /<p>/ ) {
-            $index_html = "<p>\n" . $index_html . "</p>\n\n";
-        }
-
-        $index_html = "<p>$self->{TEXT}</p>\n\n" . $index_html if $self->{TEXT};
-        $index_html =
-qq(<h2>$self->{NAME}</h2>\n\n)
-            . $index_html;
+        $index_html = "<h2>$self->{TITLE}</h2>\n\n<ul>$index_html</ul>\n\n";
     }
 
     return $index_html;

Modified: trunk/lib/Parrot/Docs/HTMLPage.pm
==============================================================================
--- trunk/lib/Parrot/Docs/HTMLPage.pm	Mon Mar  9 04:26:08 2009	(r37228)
+++ trunk/lib/Parrot/Docs/HTMLPage.pm	Mon Mar  9 04:39:01 2009	(r37229)
@@ -25,7 +25,7 @@
 use strict;
 use warnings;
 
-=item C<header($title, $navigation, $resources)>
+=item C<header($title, $navigation, $resources, $version)>
 
 Returns the page header with the specified title and navigation bar.
 C<$resources> should be the relative path from the page to
@@ -40,6 +40,7 @@
     my $title      = shift || 'Untitled';
     my $navigation = shift || '';
     my $resources  = shift || '';
+    my $version    = shift || '';
     my $breadcrumb = $navigation;
     $breadcrumb .= " &raquo; " if $navigation;
     $breadcrumb .= $title;
@@ -49,7 +50,7 @@
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
-        <title>$title</title>
+        <title>Parrot $version - $title</title>
         <link rel="stylesheet" type="text/css"
             href="$resources/parrot.css"
             media="all">
@@ -85,17 +86,24 @@
     my $self       = shift;
     my $navigation = shift || '';
     my $resources  = shift || '';
+    my $version    = shift || '';
 
-    <<"FOOTER";
+    my $footer = <<"FOOTER";
             </div> <!-- "mainbody" -->
             <div id="divider"></div>
             <div id="footer">
 	        Copyright &copy; 2002-2009, Parrot Foundation.
+FOOTER
+
+    $footer .= "\n<br>Parrot version $version" if $version;
+    $footer .= <<"FOOTER";
             </div>
         </div> <!-- "wrapper" -->
     </body>
 </html>
 FOOTER
+
+    return $footer;
 }
 
 =back

Modified: trunk/lib/Parrot/Docs/Item.pm
==============================================================================
--- trunk/lib/Parrot/Docs/Item.pm	Mon Mar  9 04:26:08 2009	(r37228)
+++ trunk/lib/Parrot/Docs/Item.pm	Mon Mar  9 04:39:01 2009	(r37229)
@@ -74,6 +74,7 @@
 
     $self = bless {
         TEXT     => $text,
+        TITLE    => $text,
         CONTENTS => \@contents,
     }, $self;
 
@@ -155,10 +156,18 @@
             print "\n", $rel_path unless $silent;
 
             my $formatter = Parrot::Docs::POD2HTML->new;
+            $formatter->no_errata_section(1); # don't dump errors into HTML output
             $formatter->write_html( $source, $target, $rel_path, $self );
 
-            $index_html .= $formatter->html_link( $formatter->append_html_suffix($rel_path),
-                $source->relative_path( $file->path ) );
+            my $title = $self->{TITLE} || $file->short_description;
+
+            if ($title) {
+                $index_html .= $formatter->html_link( $formatter->append_html_suffix($rel_path),
+                    $title );
+            } else {
+                $index_html .= $formatter->html_link( $formatter->append_html_suffix($rel_path),
+                    $source->relative_path( $file->path ) );
+            }
 
             $index_html .= "<br>\n";
 
@@ -181,24 +190,16 @@
             $index_html .= $formatter->html_link( $formatter->append_html_suffix($rel_path),
                 $source->relative_path( $file->path ) );
 
-            $index_html .= "<br>\n";
         }
     }
 
     return '' unless $index_html;
 
-    if ( !$self->{TEXT} and @short_desc ) {
-        my $short_desc = join '. ', @short_desc;
-
-        $short_desc .= '.' unless $short_desc =~ /\.$/o;
-
-        $self->{TEXT} = $short_desc;
+    if ( $self->{DESCRIPTION} ) {
+        $index_html .= "<br>$self->{DESCRIPTION}\n";
     }
 
-    if ( $self->{TEXT} ) {
-        $index_html .= "$self->{TEXT}<br>\n";
-        $index_html = '<p>' . $index_html . "</p>\n";
-    }
+    $index_html = '<li>' . $index_html . "</li>\n";
 
     return $index_html;
 }

Modified: trunk/lib/Parrot/Docs/Section.pm
==============================================================================
--- trunk/lib/Parrot/Docs/Section.pm	Mon Mar  9 04:26:08 2009	(r37228)
+++ trunk/lib/Parrot/Docs/Section.pm	Mon Mar  9 04:39:01 2009	(r37229)
@@ -118,7 +118,9 @@
         $path = $self->{INDEX_PATH};
     }
 
-    return '<a href="' . $path . '">' . $self->name . '</a>';
+    my $title = $self->{TITLE} || $self->name || 'Untitled';
+
+    return '<a href="' . $path . '">' . $title . '</a>';
 }
 
 =item C<write_html($source, $target, $silent)>
@@ -140,23 +142,17 @@
 
     return '' unless $index_html;
 
-    if ( $self->{TEXT} ) {
-        $index_html = "<p>$self->{TEXT}</p>\n\n" . $index_html;
-    }
-    elsif ( $index_html !~ /<DIV CLASS="pod">[^<]*<[Hh]/o ) {
-
-        # If there is no heading or text then we have to bump it down a bit.
-        $index_html = "<BR>\n" . $index_html;
-    }
-
     my $index = $target->file_with_name( $self->{INDEX_PATH} );
 
     $index->write(
-        Parrot::Docs::HTMLPage->header( $self->name, $self->html_navigation, '../resources' ) );
+        Parrot::Docs::HTMLPage->header( $self->name,
+                                        $self->html_navigation,
+                                        '../resources',
+                                        $self->version) );
     $index->append($index_html);
-    $index->append( Parrot::Docs::HTMLPage->footer( '', '../resources' ) );
+    $index->append( Parrot::Docs::HTMLPage->footer( '', '../resources', $self->version ) );
 
-    return $self->html_link . "<br>\n";
+    return "<li>" . $self->html_link . "</li>\n";
 }
 
 =back

Added: trunk/lib/Parrot/Docs/Section/Developer.pm
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/lib/Parrot/Docs/Section/Developer.pm	Mon Mar  9 04:39:01 2009	(r37229)
@@ -0,0 +1,70 @@
+# Copyright (C) 2004, Parrot Foundation.
+# $Id: Developer.pm 37201 2009-03-08 12:07:48Z fperrad $
+
+=head1 NAME
+
+Parrot::Docs::Section::Developer - Developer documentation section
+
+=head1 SYNOPSIS
+
+        use Parrot::Docs::Section::Developer;
+
+=head1 DESCRIPTION
+
+A documentation section describing all the POD documentation in F<docs>.
+
+=head2 Class Methods
+
+=over
+
+=cut
+
+package Parrot::Docs::Section::Developer;
+
+use strict;
+use warnings;
+
+use base qw( Parrot::Docs::Section );
+
+=item C<new()>
+
+Returns a new section.
+
+=cut
+
+sub new {
+    my $self = shift;
+
+    return $self->SUPER::new(
+        'Developer Documentation',
+        'developer.html',
+        '',
+        $self->new_group(
+            'Internals',
+            '',
+            $self->new_item( 'Bytecode Format (PBC)', 'docs/parrotbyte.pod'),
+            $self->new_item( 'Bytecode Packfile API', 'docs/packfile-c.pod'),
+            $self->new_item( 'Memory Internals', 'docs/memory_internals.pod'),
+            $self->new_item( 'Just In Time Compilation', 'docs/jit.pod'),
+            $self->new_item( 'PMC Vtables', 'docs/vtables.pod'),
+            $self->new_item( 'Embedding Parrot', 'docs/embed.pod'),
+            $self->new_item( '', 'docs/native_exec.pod' ),
+            $self->new_item( '', 'docs/porting_intro.pod' ),
+        ),
+        $self->new_group( 'Development Notes',     '', 'docs/dev' ),
+        $self->new_group( 'Articles',                      '', 'docs/user/pir' ),
+    );
+}
+
+=back
+
+=cut
+
+1;
+
+# Local Variables:
+#   mode: cperl
+#   cperl-indent-level: 4
+#   fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:

Deleted: trunk/lib/Parrot/Docs/Section/Docs.pm
==============================================================================
--- trunk/lib/Parrot/Docs/Section/Docs.pm	Mon Mar  9 04:39:01 2009	(r37228)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,88 +0,0 @@
-# Copyright (C) 2004, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-Parrot::Docs::Section::Docs - Docs documentation section
-
-=head1 SYNOPSIS
-
-        use Parrot::Docs::Section::Docs;
-
-=head1 DESCRIPTION
-
-A documentation section describing all the POD documentation in F<docs>.
-
-=head2 Class Methods
-
-=over
-
-=cut
-
-package Parrot::Docs::Section::Docs;
-
-use strict;
-use warnings;
-
-use base qw( Parrot::Docs::Section );
-
-=item C<new()>
-
-Returns a new section.
-
-=cut
-
-sub new {
-    my $self = shift;
-
-    return $self->SUPER::new(
-        'Documentation',
-        'docs.html',
-        '',
-        $self->new_group(
-            'General Documentation',
-            '',
-            $self->new_item( '', 'docs/overview.pod' ),
-            $self->new_item( '', 'docs/intro.pod' ),
-            $self->new_item( '', 'docs/gettingstarted.pod' ),
-            $self->new_item( '', 'docs/submissions.pod' ),
-            $self->new_item( '', 'docs/glossary.pod' ),
-            $self->new_item( '', 'docs/faq.pod' ),
-            $self->new_item( '', 'docs/parrot.pod' ),
-        ),
-        $self->new_group(
-            'Specific Documentation',
-            '',
-            $self->new_item( '', 'docs/configuration.pod' ),
-            $self->new_item( '', 'docs/vtables.pod' ),
-            $self->new_item( '', 'docs/multidispatch.pod' ),
-            $self->new_item( '', 'docs/memory_internals.pod' ),
-            $self->new_item( '', 'docs/parrotbyte.pod' ),
-            $self->new_item( '', 'docs/jit.pod' ),
-            $self->new_item( '', 'docs/native_exec.pod' ),
-            $self->new_item( '', 'docs/running.pod' ),
-            $self->new_item( '', 'docs/porting_intro.pod' ),
-            $self->new_item( '', 'docs/debug.pod' ),
-            $self->new_item( '', 'docs/debugger.pod' ),
-            $self->new_item( '', 'docs/tests.pod' ),
-            $self->new_item( '', 'docs/embed.pod' ),
-        ),
-        $self->new_group( 'Development Documentation',     '', 'docs/dev' ),
-        $self->new_group( 'PMC Documentation',             '', 'docs/pmc' ),
-        $self->new_group( 'Parrot Design Documents (PDD)', '', 'docs/pdds' ),
-        $self->new_group( 'Articles',                      '', 'docs/user/pir' ),
-    );
-}
-
-=back
-
-=cut
-
-1;
-
-# Local Variables:
-#   mode: cperl
-#   cperl-indent-level: 4
-#   fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:

Deleted: trunk/lib/Parrot/Docs/Section/DynaPMCs.pm
==============================================================================
--- trunk/lib/Parrot/Docs/Section/DynaPMCs.pm	Mon Mar  9 04:39:01 2009	(r37228)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,56 +0,0 @@
-# Copyright (C) 2004, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-Parrot::Docs::Section::DynaPMCs - Dynamic PMCs documentation section
-
-=head1 SYNOPSIS
-
-        use Parrot::Docs::Section::DynaPMCs;
-
-=head1 DESCRIPTION
-
-A documentation section describing all the dynamic PMCs.
-
-=head2 Class Methods
-
-=over
-
-=cut
-
-package Parrot::Docs::Section::DynaPMCs;
-
-use strict;
-use warnings;
-
-use base qw( Parrot::Docs::Section );
-
-=item C<new()>
-
-Returns a new section.
-
-=cut
-
-sub new {
-    my $self = shift;
-
-    return $self->SUPER::new(
-        'Dynamic PMCs', 'dynapmc.html', '',
-        $self->new_group( 'Loading', '', 'src/dynpmc' ),
-        $self->new_group( 'Runtime', '', 'runtime/parrot/include' ),
-    );
-}
-
-=back
-
-=cut
-
-1;
-
-# Local Variables:
-#   mode: cperl
-#   cperl-indent-level: 4
-#   fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:

Deleted: trunk/lib/Parrot/Docs/Section/EditorPlugins.pm
==============================================================================
--- trunk/lib/Parrot/Docs/Section/EditorPlugins.pm	Mon Mar  9 04:39:01 2009	(r37228)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,53 +0,0 @@
-# Copyright (C) 2004, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-Parrot::Docs::Section::EditorPlugins - Editor Plugins documentation section
-
-=head1 SYNOPSIS
-
-        use Parrot::Docs::Section::EditorPlugins;
-
-=head1 DESCRIPTION
-
-A documentation section describing Parrot-related editor plugins.
-
-=head2 Class Methods
-
-=over
-
-=cut
-
-package Parrot::Docs::Section::EditorPlugins;
-
-use strict;
-use warnings;
-
-use base qw( Parrot::Docs::Section );
-
-=item C<new()>
-
-Returns a new section.
-
-=cut
-
-sub new {
-    my $self = shift;
-
-    return $self->SUPER::new( 'Editor Plugins', 'editor.html', '',
-        $self->new_item( '', 'editor' ) );
-}
-
-=back
-
-=cut
-
-1;
-
-# Local Variables:
-#   mode: cperl
-#   cperl-indent-level: 4
-#   fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:

Modified: trunk/lib/Parrot/Docs/Section/Ops.pm
==============================================================================
--- trunk/lib/Parrot/Docs/Section/Ops.pm	Mon Mar  9 04:26:08 2009	(r37228)
+++ trunk/lib/Parrot/Docs/Section/Ops.pm	Mon Mar  9 04:39:01 2009	(r37229)
@@ -34,19 +34,33 @@
 
 sub new {
     my $self = shift;
+    my $dist = Parrot::Distribution->new;
+    my $dir  = $dist->existing_directory_with_name('src/ops');
+    my $dyndir = $dist->existing_directory_with_name('src/dynoplibs');
+
+    my @core_ops    = ();
+    my @dynamic_ops = ();
+
+    # Filter for only the .ops source files
+    foreach my $file ( $dir->files_with_suffix('ops') ) {
+        push( @core_ops, $self->new_item( '', $dist->relative_path($file) ) );
+    }
+    foreach my $dynfile ( $dyndir->files_with_suffix('ops') ) {
+        push( @dynamic_ops, $self->new_item( '', $dist->relative_path($dynfile) ) );
+    }
 
     return $self->SUPER::new(
-        'Ops',
+        'Opcodes',
         'ops.html',
         '',
         $self->new_group(
             'Tools',
             '',
             $self->new_item( '', 'tools/build/ops2c.pl' ),
-            $self->new_item( '', 'src/ops/ops.num' ),
             $self->new_item( '', 'tools/build/ops2pm.pl' ),
         ),
-        $self->new_group( 'Op Libs', '', 'src/ops' ),
+        $self->new_group( 'Opcode Libraries', '', @core_ops ),
+        $self->new_group( 'Dynamic Opcode Libraries', '', @dynamic_ops ),
     );
 }
 

Added: trunk/lib/Parrot/Docs/Section/PDDs.pm
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/lib/Parrot/Docs/Section/PDDs.pm	Mon Mar  9 04:39:01 2009	(r37229)
@@ -0,0 +1,60 @@
+# Copyright (C) 2004, Parrot Foundation.
+# $Id: Examples.pm 37201 2009-03-08 12:07:48Z fperrad $
+
+=head1 NAME
+
+Parrot::Docs::Section::PDDs - PDDs documentation section
+
+=head1 SYNOPSIS
+
+    use Parrot::Docs::Section::PDDs;
+
+=head1 DESCRIPTION
+
+A documentation section describing all the Parrot design documents.
+
+=head2 Class Methods
+
+=over
+
+=cut
+
+package Parrot::Docs::Section::PDDs;
+
+use strict;
+use warnings;
+
+use base qw( Parrot::Docs::Section );
+
+use Parrot::Docs::Item;
+use Parrot::Docs::Group;
+
+=item C<new()>
+
+Returns a new section.
+
+=cut
+
+sub new {
+    my $self = shift;
+
+    return $self->SUPER::new(
+        'Parrot Design Documents (PDDs)',
+        'pdds.html',
+        '',
+        $self->new_group( 'Design Documents',  '', 'docs/pdds' ),
+    );
+}
+
+=back
+
+=cut
+
+1;
+
+# Local Variables:
+#   mode: cperl
+#   cperl-indent-level: 4
+#   fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:

Modified: trunk/lib/Parrot/Docs/Section/PMCs.pm
==============================================================================
--- trunk/lib/Parrot/Docs/Section/PMCs.pm	Mon Mar  9 04:26:08 2009	(r37228)
+++ trunk/lib/Parrot/Docs/Section/PMCs.pm	Mon Mar  9 04:39:01 2009	(r37229)
@@ -38,10 +38,13 @@
     my $self = shift;
     my $dist = Parrot::Distribution->new;
     my $dir  = $dist->existing_directory_with_name('src/pmc');
+    my $dyndir = $dist->existing_directory_with_name('src/dynpmc');
 
     my @concrete_items = ();
     my @abstract_items = ();
+    my @dynamic_items  = ();
 
+    # Filter for only the .pmc source files
     foreach my $file ( $dir->files_with_suffix('pmc') ) {
         my $code = $file->read;
 
@@ -53,6 +56,10 @@
         }
     }
 
+    foreach my $dynfile ( $dyndir->files_with_suffix('pmc') ) {
+        push( @dynamic_items, $self->new_item( '', $dist->relative_path($dynfile) ) );
+    }
+
     return $self->SUPER::new(
         'PMCs',
         'pmc.html',
@@ -67,7 +74,8 @@
             $self->new_item( '', 'tools/dev/gen_class.pl' ),
         ),
         $self->new_group( 'Abstract PMCs', 'These PMCs are not instantiated.', @abstract_items ),
-        $self->new_group( 'Concrete PMCs', 'These PMCs are instantiated.',     @concrete_items )
+        $self->new_group( 'Concrete PMCs', 'These PMCs are instantiated.',     @concrete_items ),
+        $self->new_group( 'Dynamic PMCs',  'These PMCs are dynamically loaded.', @dynamic_items ),
     );
 }
 

Modified: trunk/lib/Parrot/Docs/Section/Parrot.pm
==============================================================================
--- trunk/lib/Parrot/Docs/Section/Parrot.pm	Mon Mar  9 04:26:08 2009	(r37228)
+++ trunk/lib/Parrot/Docs/Section/Parrot.pm	Mon Mar  9 04:39:01 2009	(r37229)
@@ -30,22 +30,20 @@
 
 use Parrot::Distribution;
 
-use Parrot::Docs::Section::Info;
-use Parrot::Docs::Section::Docs;
+use Parrot::Docs::Section::Developer;
 use Parrot::Docs::Section::Examples;
 use Parrot::Docs::Section::PMCs;
-use Parrot::Docs::Section::DynaPMCs;
-use Parrot::Docs::Section::C;
+#use Parrot::Docs::Section::C;
 use Parrot::Docs::Section::Ops;
-use Parrot::Docs::Section::IMCC;
-use Parrot::Docs::Section::Perl;
-use Parrot::Docs::Section::Libs;
+#use Parrot::Docs::Section::IMCC;
+#use Parrot::Docs::Section::Perl;
+#use Parrot::Docs::Section::Libs;
 use Parrot::Docs::Section::Tools;
 use Parrot::Docs::Section::Compilers;
-use Parrot::Docs::Section::Languages;
-use Parrot::Docs::Section::Config;
-use Parrot::Docs::Section::Tests;
-use Parrot::Docs::Section::EditorPlugins;
+#use Parrot::Docs::Section::Languages;
+#use Parrot::Docs::Section::Config;
+#use Parrot::Docs::Section::Tests;
+use Parrot::Docs::Section::PDDs;
 
 =item C<new()>
 
@@ -57,23 +55,52 @@
     my $self = shift;
 
     return $self->SUPER::new(
-        'Contents', 'index.html',
-        'What\'s in the Parrot distribution?',
-        Parrot::Docs::Section::Info->new,
-        Parrot::Docs::Section::Docs->new,
-        Parrot::Docs::Section::Examples->new,
-        Parrot::Docs::Section::PMCs->new,
-        Parrot::Docs::Section::DynaPMCs->new,
-        Parrot::Docs::Section::C->new,
-        Parrot::Docs::Section::Ops->new,
-        Parrot::Docs::Section::IMCC->new,
-        Parrot::Docs::Section::Perl->new,
-        Parrot::Docs::Section::Libs->new,
-        Parrot::Docs::Section::Tools->new,
-        Parrot::Docs::Section::Languages->new,
-        Parrot::Docs::Section::Config->new,
-        Parrot::Docs::Section::Tests->new,
-        Parrot::Docs::Section::EditorPlugins->new,
+        'Home', 'index.html',
+        'This documentation is a snapshot from the Parrot source.',
+        $self->new_group(
+            'Introduction',
+            '',
+            $self->new_item( 'Introduction to Parrot', 'docs/intro.pod'),
+            $self->new_item( 'Getting Started', 'docs/book/ch02_getting_started.pod'),
+            $self->new_item( 'Navigating the Docs', 'docs/parrot.pod'),
+            $self->new_item( 'Roles & Responsibilities', 'docs/project/roles_responsibilities.pod'),
+            $self->new_item( 'Release History', 'docs/parrothist.pod'),
+            $self->new_item( 'Donors', 'DONORS.pod'),
+            $self->new_item( 'Glossary', 'docs/glossary.pod'),
+        ),
+        $self->new_group(
+            'Working with Parrot',
+            '',
+            $self->new_item( 'Running Parrot', 'docs/running.pod'),
+            $self->new_item( 'Testing Parrot', 'docs/tests.pod'),
+            Parrot::Docs::Section::Examples->new,
+            $self->new_item( 'Developer FAQ', 'docs/gettingstarted.pod'),
+            $self->new_item( 'Submitting Bug Reports & Patches', 'docs/submissions.pod' ),
+        ),
+        $self->new_group(
+            'Implementing Languages on Parrot',
+            '',
+            $self->new_item( 'Compiler Tools', 'docs/book/ch09_pct.pod'),
+            $self->new_item( 'Compiler FAQ', 'docs/compiler_faq.pod'),
+        ),
+        $self->new_group(
+            'Design, Internals & Development',
+            '',
+            $self->new_item( 'Overview', 'docs/overview.pod'),
+            Parrot::Docs::Section::PDDs->new,
+            Parrot::Docs::Section::PMCs->new,
+            Parrot::Docs::Section::Ops->new,
+            Parrot::Docs::Section::Developer->new,
+            Parrot::Docs::Section::Tools->new,
+            $self->new_item( 'Syntax Highlighting for Vim & Emacs', 'editor/README.pod'),
+        ),
+
+#        Parrot::Docs::Section::C->new,
+#        Parrot::Docs::Section::IMCC->new,
+#        Parrot::Docs::Section::Perl->new,
+#        Parrot::Docs::Section::Libs->new,
+#        Parrot::Docs::Section::Tests->new,
+#        Parrot::Docs::Section::Config->new,
     );
 }
 
@@ -96,13 +123,15 @@
 =cut
 
 sub write_docs {
-    my $self   = shift;
-    my $silent = shift || 0;
-    my $delete = shift || 0;
-    my $dist   = Parrot::Distribution->new;
+    my $self    = shift;
+    my $silent  = shift || 0;
+    my $delete  = shift || 0;
+    my $version = shift || '';
+    my $dist    = Parrot::Distribution->new;
 
     $dist->delete_html_docs if $delete;
 
+    $self->{VERSION} = $version;
     $self->write_html( $dist, $dist->html_docs_directory, $silent );
 
     return;
@@ -122,8 +151,6 @@
 
 =item C<Parrot::Docs::Section::PMCs>
 
-=item C<Parrot::Docs::Section::DynaPMCs>
-
 =item C<Parrot::Docs::Section::C>
 
 =item C<Parrot::Docs::Section::Ops>
@@ -144,8 +171,6 @@
 
 =item C<Parrot::Docs::Section::Tests>
 
-=item C<Parrot::Docs::Section::EditorPlugins>
-
 =back
 
 =cut

Modified: trunk/lib/Parrot/Docs/Section/Tools.pm
==============================================================================
--- trunk/lib/Parrot/Docs/Section/Tools.pm	Mon Mar  9 04:26:08 2009	(r37228)
+++ trunk/lib/Parrot/Docs/Section/Tools.pm	Mon Mar  9 04:39:01 2009	(r37229)
@@ -52,25 +52,9 @@
             $self->new_item( '', 'tools/build/vtable_extend.pl' ),
         ),
         $self->new_group(
-            'Bytecode', '',
-            $self->new_item( '', 'tools/dev/pbc_header.pl' ),
-        ),
-        $self->new_group(
-            'QA',
-            '',
-            $self->new_item( '', 'parrotbug' ),
-            $self->new_item( '', 'tools/dev/manicheck.pl' ),
-        ),
-        $self->new_group(
-            'Documentation',
-            '',
-            $self->new_item( '', 'tools/dev/lib_deps.pl' ),
-            $self->new_item( '', 'tools/dev/parrot_coverage.pl' ),
-            $self->new_item( '', 'tools/docs/write_docs.pl' ),
-        ),
-        $self->new_group(
             'Building',
             '',
+            $self->new_item( '', 'docs/configuration.pod' ),
             $self->new_item( '', 'tools/build/c2str.pl' ),
             $self->new_item( '', 'tools/build/dynoplibs.pl' ),
             $self->new_item( '', 'tools/build/dynpmc.pl' ),
@@ -81,8 +65,22 @@
             $self->new_item( '', 'tools/dev/install_files.pl' ),
             $self->new_item( '', 'tools/dev/mk_manifest_and_skip.pl' ),
             $self->new_item( '', 'tools/dev/symlink.pl' ),
+            $self->new_item( '', 'tools/dev/mk_native_pbc' ),
+        ),
+        $self->new_group(
+            'Testing',
+            '',
+            $self->new_item( '', 'parrotbug' ),
+            $self->new_item( '', 'tools/dev/manicheck.pl' ),
+            $self->new_item( '', 'docs/tests.pod' ),
+        ),
+        $self->new_group(
+            'Documentation',
+            '',
+            $self->new_item( '', 'tools/dev/lib_deps.pl' ),
+            $self->new_item( '', 'tools/dev/parrot_coverage.pl' ),
+            $self->new_item( '', 'tools/docs/write_docs.pl' ),
         ),
-        $self->new_group( 'Testing', '', $self->new_item( '', 'tools/dev/mk_native_pbc' ), ),
         $self->new_group(
             'Benchmarking', '',
             $self->new_item( '', 'tools/dev/bench_op.pir' ),
@@ -95,11 +93,13 @@
             $self->new_item( '', 'tools/dev/gen_class.pl' ),
             $self->new_item( '', 'tools/dev/nm.pl' ),
             $self->new_item( '', 'tools/util/ncidef2pasm.pl' ),
+            $self->new_item( '', 'tools/dev/pbc_header.pl' ),
         ),
         $self->new_group(
-            'Possibly obsolete',
+            'Debugging',
             '',
-            $self->new_item( '', 'tools/dev/gen_charset_tables.pl' ),
+            $self->new_item( 'Debugging Tools', 'docs/debug.pod'),
+            $self->new_item( 'Parrot Debugger', 'docs/debugger.pod'),
         ),
     );
 }


More information about the parrot-commits mailing list