mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Replace the remaining bad urls with accsessible ones
Now all urls we use in our provided lyx-files (doc, examples, templates) use urls which really exist. (If a url was meant merely as an example, it was not touched, but added to file 'knownInvalidURLS'.)
This commit is contained in:
parent
9425f9ddd7
commit
abe7eef13c
@ -1,5 +1,2 @@
|
||||
#Net::HTTP: Bad hostname 'math.tulane.edu'
|
||||
http://math.tulane.edu/~entcs/
|
||||
# not found
|
||||
ftp://tug.ctan.org/pub/tex-archive/macros/latex/contrib/koma-script/scrguien.pdf
|
||||
ftp://tug.ctan.org/pub/tex-archive/macros/latex/contrib/koma-script/scrguide.pdf
|
||||
# No entry here means, there are no inaccessible
|
||||
# urls used in our lyx-source
|
||||
|
@ -40,8 +40,9 @@ BEGIN {
|
||||
|
||||
use CheckURL;
|
||||
|
||||
$ENV{LANG} = "en";
|
||||
$ENV{LANGUAGE} = "en";
|
||||
$ENV{LC_ALL} = "en_US.UTF-8";
|
||||
$ENV{LANG} = "en_US.UTF-8";
|
||||
$ENV{LANGUAGE} = "en_US.UTF-8";
|
||||
|
||||
my %URLS = ();
|
||||
my %ignoredURLS = ();
|
||||
@ -87,14 +88,14 @@ my $errorcount = 0;
|
||||
my $URLScount = 0;
|
||||
|
||||
for my $u (@urls) {
|
||||
if (defined($selectedURLS{$u})) {
|
||||
${selectedURLS}{$u}->{count} += 1;
|
||||
}
|
||||
if (defined($ignoredURLS{$u})) {
|
||||
$ignoredURLS{$u} += 1;
|
||||
$ignoredURLS{$u}->{count} += 1;
|
||||
next;
|
||||
}
|
||||
next if ($checkSelectedOnly && ! defined(${selectedURLS}{$u}));
|
||||
if (defined(${selectedURLS}{$u})) {
|
||||
${selectedURLS}{$u} += 1;
|
||||
}
|
||||
next if ($checkSelectedOnly && ! defined($selectedURLS{$u}));
|
||||
$URLScount++;
|
||||
print "Checking '$u'";
|
||||
my $res = &check_url($u);
|
||||
@ -130,8 +131,11 @@ for my $u (@urls) {
|
||||
}
|
||||
}
|
||||
|
||||
if (%URLS) {
|
||||
&printNotUsedURLS("Ignored", \%ignoredURLS);
|
||||
&printNotUsedURLS("Selected", \%selectedURLS);
|
||||
&printNotUsedURLS("KnownInvalid", \%extraURLS);
|
||||
}
|
||||
|
||||
print "\n$errorcount URL-tests failed out of $URLScount\n\n";
|
||||
exit($errorcount);
|
||||
@ -143,8 +147,13 @@ sub printNotUsedURLS($$)
|
||||
my ($txt, $rURLS) = @_;
|
||||
my @msg = ();
|
||||
for my $u ( sort keys %{$rURLS}) {
|
||||
if ($rURLS->{$u} < 2) {
|
||||
push(@msg, $u);
|
||||
if ($rURLS->{$u}->{count} < 2) {
|
||||
my @submsg = ();
|
||||
for my $f (sort keys %{$rURLS->{$u}}) {
|
||||
next if ($f eq "count");
|
||||
push(@submsg, "$f:" . $rURLS->{$u}->{$f});
|
||||
}
|
||||
push(@msg, "\n $u\n " . join("\n ", @submsg) . "\n");
|
||||
}
|
||||
}
|
||||
if (@msg) {
|
||||
@ -157,11 +166,15 @@ sub readUrls($$)
|
||||
my ($file, $rUrls) = @_;
|
||||
|
||||
die("Could not read file $file") if (! open(ULIST, $file));
|
||||
my $line = 0;
|
||||
while (my $l = <ULIST>) {
|
||||
$line++;
|
||||
$l =~ s/[\r\n]+$//; # remove eol
|
||||
$l =~ s/\s*\#.*$//; # remove comment
|
||||
next if ($l eq "");
|
||||
$rUrls->{$l} = 1;
|
||||
if (! defined($rUrls->{$l} )) {
|
||||
$rUrls->{$l} = {$file => $line, count => 1};
|
||||
}
|
||||
}
|
||||
close(ULIST);
|
||||
}
|
||||
@ -169,7 +182,7 @@ sub readUrls($$)
|
||||
sub parse_file($)
|
||||
{
|
||||
my($f) = @_;
|
||||
my $status = "out"; # outside of URL
|
||||
my $status = "out"; # outside of URL/href
|
||||
|
||||
return if ($f =~ /\/attic\//);
|
||||
if(open(FI, $f)) {
|
||||
|
@ -45217,7 +45217,7 @@ Documentation of the LaTeX-package
|
||||
\begin_inset CommandInset href
|
||||
LatexCommand href
|
||||
name "KOMA-Script"
|
||||
target "ftp://tug.ctan.org/pub/tex-archive/macros/latex/contrib/koma-script/scrguien.pdf"
|
||||
target "http://mirror.ctan.org/macros/latex/contrib/koma-script/scrguien.pdf"
|
||||
|
||||
\end_inset
|
||||
|
||||
|
@ -2700,7 +2700,7 @@ status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
http://math.tulane.edu/~entcs/
|
||||
http://www.entcs.org/generic.zip
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
@ -45273,7 +45273,7 @@ Dokumentation des LaTeX-Pakets
|
||||
\begin_inset CommandInset href
|
||||
LatexCommand href
|
||||
name "KOMA-Script"
|
||||
target "ftp://tug.ctan.org/pub/tex-archive/macros/latex/contrib/koma-script/scrguide.pdf"
|
||||
target "http://mirror.ctan.org/macros/latex/contrib/koma-script/scrguien.pdf"
|
||||
|
||||
\end_inset
|
||||
|
||||
|
@ -44579,7 +44579,7 @@ Documentación del paquete LaTeX
|
||||
\begin_inset CommandInset href
|
||||
LatexCommand href
|
||||
name "KOMA-Script"
|
||||
target "ftp://tug.ctan.org/pub/tex-archive/macros/latex/contrib/koma-script/scrguien.pdf"
|
||||
target "http://mirror.ctan.org/macros/latex/contrib/koma-script/scrguien.pdf"
|
||||
|
||||
\end_inset
|
||||
|
||||
|
@ -46371,7 +46371,7 @@ Documentation du paquetage LaTeX
|
||||
\begin_inset CommandInset href
|
||||
LatexCommand href
|
||||
name "KOMA-Script"
|
||||
target "ftp://tug.ctan.org/pub/tex-archive/macros/latex/contrib/koma-script/scrguien.pdf"
|
||||
target "http://mirror.ctan.org/macros/latex/contrib/koma-script/scrguien.pdf"
|
||||
|
||||
\end_inset
|
||||
|
||||
|
@ -41721,7 +41721,7 @@ LaTeXパッケージ
|
||||
\begin_inset CommandInset href
|
||||
LatexCommand href
|
||||
name "KOMA-script"
|
||||
target "ftp://tug.ctan.org/pub/tex-archive/macros/latex/contrib/koma-script/scrguien.pdf"
|
||||
target "http://mirror.ctan.org/macros/latex/contrib/koma-script/scrguien.pdf"
|
||||
|
||||
\end_inset
|
||||
|
||||
|
@ -2439,7 +2439,7 @@ status collapsed
|
||||
|
||||
\begin_layout Plain Layout
|
||||
|
||||
http://math.tulane.edu/~entcs/
|
||||
http://www.entcs.org/generic.zip
|
||||
\end_layout
|
||||
|
||||
\end_inset
|
||||
|
Loading…
Reference in New Issue
Block a user