<h3 id="TOP">Index</h3>
<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#CATEGORY">CATEGORY</a></li>
<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
<li><a href="#METHODS">METHODS</a>
<p>SDL::App - a SDL perl extension</p>
</div>
+<h1 id="CATEGORY">CATEGORY</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="CATEGORY_CONTENT">
+<p>Extension</p>
+
+</div>
<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
<div id="SYNOPSIS_CONTENT">
<pre> use SDL;
<h3 id="TOP">Index</h3>
<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#CATEGORY">CATEGORY</a></li>
<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
<li><a href="#METHODS">METHODS</a>
<p>SDL::Mixer - a SDL perl extension</p>
</div>
+<h1 id="CATEGORY">CATEGORY</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="CATEGORY_CONTENT">
+<p>Mixer</p>
+
+</div>
<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
<div id="SYNOPSIS_CONTENT">
<pre> $mixer = new SDL::Mixer -frequency => MIX_DEFAULT_FREQUENCY,
<!-- INDEX START -->
<h3 id="TOP">Index</h3>
-<ul><li><a href="#NAME">NAME</a></li>
+<ul><li><a href="#NAME">NAME</a>
+<ul><li><a href="#CATEGORY">CATEGORY</a></li>
+</ul>
+</li>
<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
<li><a href="#METHODS">METHODS</a>
<p>SDL::Surface - Graphic surface structure. Access to <code>SDL_Surface</code>.</p>
</div>
+<h2 id="CATEGORY">CATEGORY</h2>
+<div id="CATEGORY_CONTENT">
+<p>Core, Video, Structure</p>
+
+
+
+
+
+</div>
<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
<div id="SYNOPSIS_CONTENT">
<p>The main surface (display) is provided by <cite>SDL::Video::set_video_mode</cite>.
<h3 id="TOP">Index</h3>
<ul><li><a href="#NAME">NAME</a></li>
-<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
+<li><a href="#CATEGORY">CATEGORY</a></li>
<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
<li><a href="#METHODS">METHODS</a>
<ul><li><a href="#get_video_surface">get_video_surface</a></li>
<p>SDL::Video - Bindings to the video category in SDL API</p>
</div>
-<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
-<div id="SYNOPSIS_CONTENT">
-<p>To be done.</p>
+<h1 id="CATEGORY">CATEGORY</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="CATEGORY_CONTENT">
+<p>Core, Video</p>
</div>
<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
<!-- INDEX START -->
<h3 id="TOP">Index</h3>
-<ul><li><a href="#NAME">NAME</a></li>
+<ul><li><a href="#NAME">NAME</a>
+<ul><li><a href="#CATEGORY">CATEGORY</a></li>
+</ul>
+</li>
<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
<li><a href="#The_SDL_Perl_2009_Development_Team">The SDL Perl 2009 Development Team</a>
<p>SDL_perl - Simple DirectMedia Layer for Perl</p>
</div>
+<h2 id="CATEGORY">CATEGORY</h2>
+<div id="CATEGORY_CONTENT">
+<p>Core</p>
+
+</div>
<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
<div id="SYNOPSIS_CONTENT">
<pre> use SDL;
<div class="pod">
-<h1>Documentation (latest development branch)</h1><table><tr><td colspan="3"><h1>Core</h1></td></tr><tr><td><img src="assets/SDL_thumb.png" alt="thumb" /></td><td><a href="SDL.html">SDL</a></td><td> Simple DirectMedia Layer for Perl</td></tr><tr><td><img src="assets/bubble-3-mini.png" alt="thumb" /></td><td><a href="SDL-Color.html">SDL::Color</a></td><td> Format independent color description</td></tr><tr><td><img src="assets/bubble-5-mini.png" alt="thumb" /></td><td><a href="SDL-Event.html">SDL::Event</a></td><td> General event structure</td></tr><tr><td><img src="assets/bubble-6-mini.png" alt="thumb" /></td><td><a href="SDL-Events.html">SDL::Events</a></td><td> Bindings to the Events Category in SDL API</td></tr><tr><td><img src="assets/bubble-1-mini.png" alt="thumb" /></td><td><a href="SDL-MultiThread.html">SDL::MultiThread</a></td><td> Bindings to the MultiThread category in SDL API</td></tr><tr><td><img src="assets/bubble-6-mini.png" alt="thumb" /></td><td><a href="SDL-Overlay.html">SDL::Overlay</a></td><td> YUV Video overlay</td></tr><tr><td><img src="assets/bubble-5-mini.png" alt="thumb" /></td><td><a href="SDL-PixelFormat.html">SDL::PixelFormat</a></td><td> Stores surface format information</td></tr><tr><td><img src="assets/bubble-7-mini.png" alt="thumb" /></td><td><a href="SDL-Rect.html">SDL::Rect</a></td><td> Defines a rectangular area</td></tr><tr><td><img src="assets/bubble-3-mini.png" alt="thumb" /></td><td><a href="SDL-Surface.html">SDL::Surface</a></td><td></td></tr><tr><td><img src="assets/bubble-7-mini.png" alt="thumb" /></td><td><a href="SDL-Video.html">SDL::Video</a></td><td> Bindings to the video category in SDL API</td></tr><tr><td><img src="assets/bubble-3-mini.png" alt="thumb" /></td><td><a href="SDL-VideoInfo.html">SDL::VideoInfo</a></td><td> Video Target Information </td></tr><tr><td colspan="3"><h1>TTF</h1></td></tr><tr><td><img src="assets/bubble-6-mini.png" alt="thumb" /></td><td><a href="SDL-TTFont.html">SDL::TTFont</a></td><td> a SDL perl extension</td></tr><tr><td colspan="3"><h1>Tutorials</h1></td></tr><tr><td><img src="assets/bubble-2-mini.png" alt="thumb" /></td><td><a href="SDL-Tutorial.html">SDL::Tutorial</a></td><td> introduction to Perl SDL</td></tr><tr><td><img src="assets/bubble-1-mini.png" alt="thumb" /></td><td><a href="SDL-Tutorial-Animation.html">SDL::Tutorial::Animation</a></td><td></td></tr><tr><td><img src="assets/bubble-4-mini.png" alt="thumb" /></td><td><a href="SDL-Tutorial-Images.html">SDL::Tutorial::Images</a></td><td></td></tr><tr><td><img src="assets/bubble-1-mini.png" alt="thumb" /></td><td><a href="SDL-Tutorial-LunarLander.html">SDL::Tutorial::LunarLander</a></td><td> a small tutorial on Perl SDL</td></tr><tr><td><img src="assets/bubble-4-mini.png" alt="thumb" /></td><td><a href="SDL-Tutorial-Pong.html">SDL::Tutorial::Pong</a></td><td></td></tr><tr><td><img src="assets/bubble-2-mini.png" alt="thumb" /></td><td><a href="SDL-Tutorial-Tetris.html">SDL::Tutorial::Tetris</a></td><td></td></tr><tr><td colspan="3"><h1>Cookbook</h1></td></tr><tr><td><img src="assets/bubble-2-mini.png" alt="thumb" /></td><td><a href="SDL-Cookbook.html">SDL::Cookbook</a></td><td></td></tr><tr><td><img src="assets/bubble-6-mini.png" alt="thumb" /></td><td><a href="SDL-Cookbook-PDL.html">SDL::Cookbook::PDL</a></td><td></td></tr><tr><td colspan="3"><h1>Extensions</h1></td></tr><tr><td><img src="assets/bubble-2-mini.png" alt="thumb" /></td><td><a href="SDL-App.html">SDL::App</a></td><td> a SDL perl extension</td></tr><tr><td><img src="assets/bubble-2-mini.png" alt="thumb" /></td><td><a href="SDL-Cdrom.html">SDL::Cdrom</a></td><td> a SDL perl extension for managing CD-ROM drives</td></tr><tr><td><img src="assets/bubble-7-mini.png" alt="thumb" /></td><td><a href="SDL-Cursor.html">SDL::Cursor</a></td><td> a SDL perl extension</td></tr><tr><td><img src="assets/bubble-2-mini.png" alt="thumb" /></td><td><a href="SDL-Font.html">SDL::Font</a></td><td> a SDL perl extension</td></tr><tr><td><img src="assets/bubble-6-mini.png" alt="thumb" /></td><td><a href="SDL-Game-Palette.html">SDL::Game::Palette</a></td><td> a perl extension</td></tr><tr><td><img src="assets/bubble-6-mini.png" alt="thumb" /></td><td><a href="SDL-MPEG.html">SDL::MPEG</a></td><td> a SDL perl extension</td></tr><tr><td><img src="assets/bubble-3-mini.png" alt="thumb" /></td><td><a href="SDL-Mixer.html">SDL::Mixer</a></td><td> a SDL perl extension</td></tr><tr><td><img src="assets/bubble-1-mini.png" alt="thumb" /></td><td><a href="SDL-Music.html">SDL::Music</a></td><td> a perl extension</td></tr><tr><td><img src="assets/bubble-7-mini.png" alt="thumb" /></td><td><a href="SDL-OpenGL.html">SDL::OpenGL</a></td><td> a perl extension</td></tr><tr><td><img src="assets/bubble-2-mini.png" alt="thumb" /></td><td><a href="SDL-Palette.html">SDL::Palette</a></td><td> a perl extension</td></tr><tr><td><img src="assets/bubble-6-mini.png" alt="thumb" /></td><td><a href="SDL-SFont.html">SDL::SFont</a></td><td> a perl extension</td></tr><tr><td><img src="assets/bubble-3-mini.png" alt="thumb" /></td><td><a href="SDL-SMPEG.html">SDL::SMPEG</a></td><td> a SDL perl extension</td></tr><tr><td><img src="assets/bubble-1-mini.png" alt="thumb" /></td><td><a href="SDL-Sound.html">SDL::Sound</a></td><td> a perl extension</td></tr><tr><td><img src="assets/bubble-5-mini.png" alt="thumb" /></td><td><a href="SDL-Timer.html">SDL::Timer</a></td><td> a SDL perl extension to handle timers</td></tr><tr><td><img src="assets/bubble-7-mini.png" alt="thumb" /></td><td><a href="SDL-Tool-Font.html">SDL::Tool::Font</a></td><td> a perl extension</td></tr><tr><td><img src="assets/bubble-1-mini.png" alt="thumb" /></td><td><a href="SDL-Tool-Graphic.html">SDL::Tool::Graphic</a></td><td></td></tr><tr><td><img src="assets/bubble-4-mini.png" alt="thumb" /></td><td><a href="Time.html">Time</a></td><td> a SDL perl extension for managing timers.</td></tr></table></div>
+<h1>Documentation (latest development branch)</h1><table style="padding-left: 0px"><tr><td colspan="3"><strong style="font-size: 14px">Core</strong></td></tr><tr><td><img src="assets/SDL_thumb.png" alt="thumb" /></td><td><a href="SDL.html">SDL</a></td><td> Simple DirectMedia Layer for Perl</td></tr></table><table style="padding-left: 30px"><tr><td colspan="3"><strong style="font-size: 14px">Video</strong></td></tr><tr><td><img src="assets/bubble-5-mini.png" alt="thumb" /></td><td><a href="SDL-Video.html">SDL::Video</a></td><td> Bindings to the video category in SDL API</td></tr></table><table style="padding-left: 60px"><tr><td colspan="3"><strong style="font-size: 14px">Structure</strong></td></tr><tr><td><img src="assets/bubble-6-mini.png" alt="thumb" /></td><td><a href="SDL-Surface.html">SDL::Surface</a></td><td></td></tr></table><br /><table style="padding-left: 0px"><tr><td colspan="3"><strong style="font-size: 14px">Extension</strong></td></tr><tr><td><img src="assets/bubble-2-mini.png" alt="thumb" /></td><td><a href="SDL-App.html">SDL::App</a></td><td> a SDL perl extension</td></tr></table><br /><table style="padding-left: 0px"><tr><td colspan="3"><strong style="font-size: 14px">Mixer</strong></td></tr><tr><td><img src="assets/bubble-4-mini.png" alt="thumb" /></td><td><a href="SDL-Mixer.html">SDL::Mixer</a></td><td> a SDL perl extension</td></tr></table><br /><table style="padding-left: 0px"><tr><td colspan="3"><strong style="font-size: 14px">UNCATEGORIZED</strong></td></tr><tr><td><img src="assets/bubble-2-mini.png" alt="thumb" /></td><td><a href="SDL-Cdrom.html">SDL::Cdrom</a></td><td> a SDL perl extension for managing CD-ROM drives</td></tr><tr><td><img src="assets/bubble-4-mini.png" alt="thumb" /></td><td><a href="SDL-Color.html">SDL::Color</a></td><td> Format independent color description</td></tr><tr><td><img src="assets/bubble-2-mini.png" alt="thumb" /></td><td><a href="SDL-Cookbook.html">SDL::Cookbook</a></td><td></td></tr><tr><td><img src="assets/bubble-5-mini.png" alt="thumb" /></td><td><a href="SDL-Cookbook-PDL.html">SDL::Cookbook::PDL</a></td><td></td></tr><tr><td><img src="assets/bubble-6-mini.png" alt="thumb" /></td><td><a href="SDL-Cursor.html">SDL::Cursor</a></td><td> a SDL perl extension</td></tr><tr><td><img src="assets/bubble-4-mini.png" alt="thumb" /></td><td><a href="SDL-Event.html">SDL::Event</a></td><td> General event structure</td></tr><tr><td><img src="assets/bubble-4-mini.png" alt="thumb" /></td><td><a href="SDL-Events.html">SDL::Events</a></td><td> Bindings to the Events Category in SDL API</td></tr><tr><td><img src="assets/bubble-3-mini.png" alt="thumb" /></td><td><a href="SDL-Font.html">SDL::Font</a></td><td> a SDL perl extension</td></tr><tr><td><img src="assets/bubble-5-mini.png" alt="thumb" /></td><td><a href="SDL-Game-Palette.html">SDL::Game::Palette</a></td><td> a perl extension</td></tr><tr><td><img src="assets/bubble-5-mini.png" alt="thumb" /></td><td><a href="SDL-MPEG.html">SDL::MPEG</a></td><td> a SDL perl extension</td></tr><tr><td><img src="assets/bubble-2-mini.png" alt="thumb" /></td><td><a href="SDL-MultiThread.html">SDL::MultiThread</a></td><td> Bindings to the MultiThread category in SDL API</td></tr><tr><td><img src="assets/bubble-5-mini.png" alt="thumb" /></td><td><a href="SDL-Music.html">SDL::Music</a></td><td> a perl extension</td></tr><tr><td><img src="assets/bubble-5-mini.png" alt="thumb" /></td><td><a href="SDL-OpenGL.html">SDL::OpenGL</a></td><td> a perl extension</td></tr><tr><td><img src="assets/bubble-5-mini.png" alt="thumb" /></td><td><a href="SDL-Overlay.html">SDL::Overlay</a></td><td> YUV Video overlay</td></tr><tr><td><img src="assets/bubble-6-mini.png" alt="thumb" /></td><td><a href="SDL-Palette.html">SDL::Palette</a></td><td> a perl extension</td></tr><tr><td><img src="assets/bubble-4-mini.png" alt="thumb" /></td><td><a href="SDL-PixelFormat.html">SDL::PixelFormat</a></td><td> Stores surface format information</td></tr><tr><td><img src="assets/bubble-1-mini.png" alt="thumb" /></td><td><a href="SDL-Rect.html">SDL::Rect</a></td><td> Defines a rectangular area</td></tr><tr><td><img src="assets/bubble-5-mini.png" alt="thumb" /></td><td><a href="SDL-SFont.html">SDL::SFont</a></td><td> a perl extension</td></tr><tr><td><img src="assets/bubble-2-mini.png" alt="thumb" /></td><td><a href="SDL-SMPEG.html">SDL::SMPEG</a></td><td> a SDL perl extension</td></tr><tr><td><img src="assets/bubble-3-mini.png" alt="thumb" /></td><td><a href="SDL-Sound.html">SDL::Sound</a></td><td> a perl extension</td></tr><tr><td><img src="assets/bubble-1-mini.png" alt="thumb" /></td><td><a href="SDL-TTFont.html">SDL::TTFont</a></td><td> a SDL perl extension</td></tr><tr><td><img src="assets/bubble-7-mini.png" alt="thumb" /></td><td><a href="SDL-Timer.html">SDL::Timer</a></td><td> a SDL perl extension to handle timers</td></tr><tr><td><img src="assets/bubble-6-mini.png" alt="thumb" /></td><td><a href="SDL-Tool-Font.html">SDL::Tool::Font</a></td><td> a perl extension</td></tr><tr><td><img src="assets/bubble-2-mini.png" alt="thumb" /></td><td><a href="SDL-Tool-Graphic.html">SDL::Tool::Graphic</a></td><td></td></tr><tr><td><img src="assets/bubble-6-mini.png" alt="thumb" /></td><td><a href="SDL-Tutorial.html">SDL::Tutorial</a></td><td> introduction to Perl SDL</td></tr><tr><td><img src="assets/bubble-3-mini.png" alt="thumb" /></td><td><a href="SDL-Tutorial-Animation.html">SDL::Tutorial::Animation</a></td><td></td></tr><tr><td><img src="assets/bubble-7-mini.png" alt="thumb" /></td><td><a href="SDL-Tutorial-Images.html">SDL::Tutorial::Images</a></td><td></td></tr><tr><td><img src="assets/bubble-6-mini.png" alt="thumb" /></td><td><a href="SDL-Tutorial-LunarLander.html">SDL::Tutorial::LunarLander</a></td><td> a small tutorial on Perl SDL</td></tr><tr><td><img src="assets/bubble-1-mini.png" alt="thumb" /></td><td><a href="SDL-Tutorial-Pong.html">SDL::Tutorial::Pong</a></td><td></td></tr><tr><td><img src="assets/bubble-7-mini.png" alt="thumb" /></td><td><a href="SDL-Tutorial-Tetris.html">SDL::Tutorial::Tetris</a></td><td></td></tr><tr><td><img src="assets/bubble-2-mini.png" alt="thumb" /></td><td><a href="SDL-VideoInfo.html">SDL::VideoInfo</a></td><td> Video Target Information </td></tr><tr><td><img src="assets/bubble-6-mini.png" alt="thumb" /></td><td><a href="Time.html">Time</a></td><td> a SDL perl extension for managing timers.</td></tr></table></div>
my $parser = Pod::Xhtml->new(FragmentOnly => 1, StringMode => 1);
my %module_names = ();
my %thumbnails = ();
+my %files = ();
my $fh;
read_file($input_path);
# creating index file
open($fh, '>', File::Spec->catfile($pages_path, 'documentation.html-inc'));
binmode($fh, ":utf8");
-print($fh "<div class=\"pod\">\n<h1>Documentation (latest development branch)</h1><table>");
-for my $module_name (sort keys %module_names)
+print($fh "<div class=\"pod\">\n<h1>Documentation (latest development branch)</h1>");
+my $last_section = '';
+#for my $module_name (sort keys %module_names)
+for my $key (sort keys %files)
{
- my $icon = sprintf('<img src="assets/bubble-%d-mini.png" alt="thumb" />', int((rand() * 7) + 1));
- my $name = $module_name;
- my $desc = '';
+ my $icon = defined $files{$key}{'thumb'}
+ ? sprintf('<img src="assets/%s" alt="thumb" />', $files{$key}{'thumb'})
+ : sprintf('<img src="assets/bubble-%d-mini.png" alt="thumb" />', int((rand() * 7) + 1));
+
+ my @matches = ( $files{$key}{'section'} =~ m/\w+/xg );
- if($module_name =~ /^([^\-]+)\-(.+)$/)
+ if($last_section ne $files{$key}{'section'})
{
- $name = $1;
- $desc = $2;
- }
-
- if(defined $thumbnails{$module_name})
- {
- $icon = sprintf('<img src="assets/%s" alt="thumb" />', $thumbnails{$module_name});
+ print ($fh '</table>') if $last_section;
+ print ($fh '<br />') if $last_section && !$#matches;
+ printf($fh '<table style="padding-left: %dpx"><tr><td colspan="3"><strong style="font-size: 14px">%s</strong></td></tr>',
+ $#matches * 30, pop(@matches));
+ $last_section = $files{$key}{'section'};
}
printf($fh '<tr><td>%s</td><td><a href="%s">%s</a></td><td>%s</td></tr>',
- $icon, $module_names{$module_name}, $name, $desc);
+ $icon, $files{$key}{'path'}, $files{$key}{'name'}, $files{$key}{'desc'});
}
print($fh "</table></div>\n");
close($fh);
read_file($_) if(-d $_);
if($_ =~ /\.pod$/i)
{
+ my $key = '';
my $file_name = $_;
$file_name =~ s/^$input_path\/*//;
my $module_name = $file_name;
$file_name = File::Spec->catfile($pages_path, $file_name);
$parser->parse_from_file($_); #, $file_name);
- $module_name .= " - $1" if $parser->asString =~ /<div id="NAME_CONTENT">\s*<p>\s*[^<>\-]+\-([^<>]+)\s*<\/p>\s*<\/div>/;
- $module_names{$module_name} = $file_path;
+
+ $key = $parser->asString =~ /<div id="CATEGORY_CONTENT">\s*<p>\s*([^<>]+)\s*<\/p>\s*<\/div>/
+ ? "$1 $_"
+ : "UNCATEGORIZED/$_";
+ $files{$key}{'path'} = $file_path;
+ $files{$key}{'name'} = $module_name;
+ $files{$key}{'desc'} = $parser->asString =~ /<div id="NAME_CONTENT">\s*<p>\s*[^<>\-]+\-([^<>]+)\s*<\/p>\s*<\/div>/
+ ? $1
+ : '';
+ $files{$key}{'section'} = $parser->asString =~ /<div id="CATEGORY_CONTENT">\s*<p>\s*([^<>]+)\s*<\/p>\s*<\/div>/
+ ? $1
+ : 'UNCATEGORIZED';
# handling images
my $image_path = $_;
if($image_file_name =~ /_thumb\.(jpg|jpeg|png|gif)$/)
{
- $thumbnails{$module_name} = $image_file_name;
+ $files{$key}{'thumb'} = $image_file_name;
}
else
{