modules.perl6.org and BreakDancer – next steps!

About modules.perl6.org

Some new variables have been added to make generating site using cron easier. Now it is updated every hour. We don’t have to worry about doing it by ourselves!

Now it generates sites for every single module – where we can (among others) read the README file.

It made generating process lasts longer… but not so much (up to 5 minutes)!

real	4m36.213s
user	2m50.219s
sys	0m2.156s

In the future I want to connect this project with ecosystem, as it’s with current modules.perl6.org. Probably we’ll add prasing Markdown (using Text::Markdown) and POD (as afiskon suggested – thank you!).

 

About parsing POD

I thought that we can add a simple file browser where user can see what every file contains and the content will be parsed using Pod::To:HTML. Is it a good idea? Unfortunately it’ll be very slow…

 

About BreakDancer (not BreakBailador as I wrote here)

Tadzik and me started BreakDancer. There are some tests, you can look at it to find out how it works for now.

We thought it should work like this:

Selec All Code:
1
2
3
use BreakDancer;
 
gen "/module/", %modules, { template 'module.tt' => ($^a, $^b) };

The first argument contains a path where BreakDancer should generate HTML documents.
The second argument (%modules) contains a hash, like this one:

Selec All Code:
1
2
3
4
{
"Module::Name" => ($a, $b),
"Another::Module" => ($a1, $b1)
}

and so on…

The third argument contains a code. What it returns will be written to HTML documents.

Calling &gen, it should create directories named as keys of %modules and a index.htm inside them with what the third argument of &gen returned. It’ll also pass values of %modules as arguments of the third &gen’s argument. The &template subroutine will probably use Template::Mojo and it’ll return the final HTML code to write to index.htm. Of course we’ll be able not to use Template::Mojo, in this case, simply, we shouldn’t use &template.

Hope you’ll enjoy this! Write what you think about it.

 

Feel free to contribute BreakDancer and modules.perl6.org.

Waiting for comments!

Tags: , ,

Leave a Reply


Refresh