Skip to content
This repository was archived by the owner on Nov 16, 2020. It is now read-only.

Commit 8d948eb

Browse files
committed
implement links for compiler names. It is an ugly hack, but so is the rest of this script :/
1 parent f2b12b0 commit 8d948eb

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

features.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
= ABBREVIATIONS
2-
rm Rakudo/master
3-
rn Rakudo/nom
4-
n Niecza
2+
rm Rakudo/master http://rakudo.org/
3+
rn Rakudo/nom http://pmthium.com/2011/02/08/new-nqp-repository-new-nom-rakudo-branch/
4+
n Niecza https://github.com/sorear/niecza
55

66
= Basics
77
Basic control structures: rm+ rn+ n+

process.pl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
open my $f, '<:encoding(UTF-8)', 'features.txt';
1111
binmode(STDOUT, ":encoding(UTF-8)");
1212
my %abbr_name;
13+
my %abbr_link;
1314
my %abbr_index;
1415
my $index = 0;
1516
my $in_abbr_section;
@@ -29,8 +30,10 @@
2930
}
3031
else {
3132
if ($in_abbr_section) {
32-
my ($abbr, $name) = split /\s+/, $_, 2;
33+
my ($abbr, $rest) = split /\s+/, $_, 2;
34+
my ($name, $url) = split /\s+(?=http)/, $rest, 2;
3335
$abbr_name{$abbr} = $name;
36+
$abbr_link{$abbr} = $url;
3437
$abbr_index{$abbr} = ++$index;
3538
}
3639
else {
@@ -63,7 +66,10 @@ sub write_html {
6366
);
6467
my @compilers;
6568
for (keys %abbr_index) {
66-
$compilers[$abbr_index{$_}] = {name => $abbr_name{$_}};
69+
$compilers[$abbr_index{$_}] = {
70+
name => $abbr_name{$_},
71+
link => $abbr_link{$_},
72+
};
6773
}
6874
shift @compilers;
6975
$t->param(compilers => \@compilers);

template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ <h2>Features</h2>
6363
<tr>
6464
<th>Feature</th>
6565
<%loop compilers%>
66-
<th><%var name%></th>
66+
<th><a href="<%var link%>"><%var name%></a></th>
6767
<%/loop%>
6868
</tr>
6969
</thead>

0 commit comments

Comments
 (0)