#!wml
https://gitweb.torproject.org/tor.git?a=blob_plain;hb=HEAD;f=
https://gitweb.torproject.org/tor.git?a=blob_plain;hb=release-0.2.1;f=
https://gitweb.torproject.org/tor.git?a=tree;hb=HEAD;f=
https://gitweb.torproject.org/tor.git?a=tree;hb=HEAD
https://svn.torproject.org/svn/website/trunk/
https://svn.torproject.org/svn/projects/
https://trac.torproject.org/projects/tor/wiki/
https://trac.torproject.org/projects/tor/wiki/TheOnionRouter/TorFAQ
https://blog.torproject.org/
https://gitweb.torproject.org/torbrowser.git/blob_plain/HEAD:
# Xinclude "locallinks.wmi"
# Xinclude "langlocallinks.$(LANG).wmi"
<:
sub stripDotSlashs($) {
my ($s) = @_;
1 while ($s =~ s|/\./|/|);
1 while ($s =~ s|^\./||);
return $s;
};
:>
<: sub pageToURL($$) {
my ($page, $lang) = @_;
my ($dir, $base) = $page =~ m,^(?:(.*)/)?(.*?)$,;
$dir = '.' unless defined $dir;
if (-e "$(DOCROOT)/$lang/$dir/$base.wml") {
return stripDotSlashs("$(DOCROOT)/$dir/$base.html.$lang");
} elsif (-e "$(DOCROOT)/$dir/en/$base.wml") {
return stripDotSlashs("$(DOCROOT)/$dir/$base.html.en");
} elsif ($page =~ /^http/) {
return $page;
} else {
warn "$WML_SRC_FILENAME has a [page $page] (parses to docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$lang/$dir/$base.wml), but that doesn't exist.";
};
}
:>
<:{
my $page="%0";
my $lang="$(LANG)";
my ($dir, $base) = $page =~ m,^(?:(.*)/)?(.*?)$,;
$dir = '.' unless defined $dir;
if (-e "$(DOCROOT)/$dir/$lang/$base.wml") {
print stripDotSlashs("$(DOCROOT)/$dir/$base.html.$lang");
} elsif (-e "$(DOCROOT)/en/$dir/$base.wml") {
print stripDotSlashs("$(DOCROOT)/$dir/$base.html");
} else {
warn "$WML_SRC_FILENAME has a [page $page] (parses to docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$lang/$dir/$base.wml), but that doesn't exist.";
};
}:>