Skip to content

Commit

Permalink
Fifth's the charm
Browse files Browse the repository at this point in the history
  • Loading branch information
JJ committed Jul 30, 2019
1 parent 3fb402a commit a760686
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions util/issue-with-all-pod6.p6
Expand Up @@ -8,12 +8,18 @@ for @docs -> $d {
my $repo-path = S[doc] = '/perl6/doc/blob/master/doc' with $d;
my $web-path = S[doc] = 'https://docs.perl6.org' with $d;
my $doc-name = $d.split("/")[*-1].split(".")[0];
if $web-path ~~ /Type/ {
my @fragments = $web-path.split("/Type/");
$doc-name = @fragments[1].trans( ['/'] => ['::'] ).split(".")[0];
$web-path = @fragments[0] ~ "/type/" ~ $doc-name;
given $web-path {
when /Type/ {
my @fragments = $web-path.split("/Type/");
$doc-name = @fragments[1].trans( ['/'] => ['::'] ).split(".")[0];
$web-path = @fragments[0] ~ "/type/" ~ $doc-name;
}
when "https://docs.perl6.org/HomePage.pod6" {
$web-path = "https://docs.perl6.org/"
}
}
$web-path .= trans( [ "Language", "Programs" ] =>
[ "language", "programs" ] );

$web-path .= trans( [ "Language", "Programs", ".pod6" ] =>
[ "language", "programs", "" ] );
say "* [ ] $doc-name [file]($repo-path), [generated]($web-path)";
}

0 comments on commit a760686

Please sign in to comment.