Cmake build tests: href entries checked

Our lyx-files are referencing urls also with
a href inset. We check now also these.

search_url.pl: Added check for href
*.lyx: Corrected href
This commit is contained in:
Kornel Benko 2013-08-28 19:51:19 +02:00
parent 73e03bb7d8
commit 4f043fba4d
16 changed files with 54 additions and 30 deletions

View File

@ -1,4 +1,5 @@
#Net::HTTP: Bad hostname 'math.tulane.edu'
http://math.tulane.edu/~entcs/
# Net::HTTP: Bad hostname 'media.texample.net'
http://media.texample.net/tikz/examples/TEX/free-body-diagrams.tex
# 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

View File

@ -1,2 +1,4 @@
http://www.uon.edu/doe
proto://host.xx.ab/abcd
ftp://www.test.test
http://www.test.test
#proto://host.xx.ab/abcd

View File

@ -120,7 +120,8 @@ for my $u (@urls) {
if ($printSourceFiles) {
if (defined($URLS{$u})) {
for my $f(sort keys %{$URLS{$u}}) {
print " $f\n";
my $lines = ":" . join(',', @{$URLS{$u}->{$f}});
print " $f$lines\n";
}
}
if ($res ) {
@ -172,23 +173,42 @@ sub parse_file($)
return if ($f =~ /\/attic\//);
if(open(FI, $f)) {
my $line = 0;
while(my $l = <FI>) {
$line++;
$l =~ s/[\r\n]+$//; # Simulate chomp
if($status eq "out") {
if ($status eq "out") {
# searching for "\begin_inset Flex URL"
if($l =~ /^\s*\\begin_inset\s+Flex\s+URL\s*$/) {
$status = "ininset";
$status = "inUrlInset";
}
elsif ($l =~ /^\s*\\begin_inset\s+CommandInset\s+href\s*$/) {
$status = "inHrefInset";
}
else {
# Outside of url, check also
if ($l =~ /"((ftp|http|https):\/\/[^ ]+)"/) {
my $url = $1;
&handle_url($url, $f, "x$line");
}
}
}
else {
if($l =~ /^\s*\\end_(layout|inset)\s*$/) {
$status = "out";
}
else {
if($l =~ /\s*([a-z]+:\/\/.+)\s*$/) {
elsif ($status eq "inUrlInset") {
if ($l =~ /\s*([a-z]+:\/\/.+)\s*$/) {
my $url = $1;
$status = "out";
&handle_url($url, $f);
&handle_url($url, $f, "u$line");
}
}
elsif ($status eq "inHrefInset") {
if ($l =~ /^target\s+"([a-z]+:\/\/[^ ]+)"$/) {
my $url = $1;
$status = "out";
&handle_url($url, $f, "h$line");
}
}
}
@ -197,12 +217,13 @@ sub parse_file($)
}
}
sub handle_url($$)
sub handle_url($$$)
{
my($url, $f) = @_;
my($url, $f, $line) = @_;
if(!defined($URLS{$url})) {
$URLS{$url} = {};
$URLS{$url}->{$f} = [];
}
$URLS{$url}->{$f} = 1;
push(@{$URLS{$url}->{$f}}, $line);
}

View File

@ -45025,7 +45025,7 @@ Documentation of the LaTeX-package
\begin_inset CommandInset href
LatexCommand href
name "caption"
target "ftp://tug.ctan.org/pub/tex-archive/macros/latex/contrib/caption/caption.pdf"
target "http://mirrors.ctan.org/macros/latex/contrib/caption/caption-eng.pdf"
\end_inset

View File

@ -462,7 +462,7 @@ AmS
\begin_inset CommandInset href
LatexCommand href
name "amsguide.ps"
target "ftp://ctan.tug.org/tex-archive/macros/amstex/doc/amsguide.ps"
target "ftp://ftp.ams.org/pub/tex/doc/amstex/amsguide.pdf"
\end_inset
@ -38234,7 +38234,7 @@ key "AMS"
\begin_inset CommandInset href
LatexCommand href
name "Description"
target "ftp://ftp.ams.org/pub/tex/doc/amsmath/amsldoc.pdf"
target "http://mirrors.ctan.org/macros/latex/required/amslatex/math/amsldoc.pdf"
\end_inset

View File

@ -470,7 +470,7 @@ AmS
\begin_inset CommandInset href
LatexCommand href
name "amsguide.ps"
target "ftp://ctan.tug.org/tex-archive/macros/amstex/doc/amsguide.ps"
target "ftp://ftp.ams.org/pub/tex/doc/amstex/amsguide.pdf"
\end_inset
@ -38291,7 +38291,7 @@ key "AMS"
\begin_inset CommandInset href
LatexCommand href
name "Beschreibung"
target "ftp://ftp.ams.org/pub/tex/doc/amsmath/amsldoc.pdf"
target "http://mirrors.ctan.org/macros/latex/required/amslatex/math/amsldoc.pdf"
\end_inset

View File

@ -44387,7 +44387,7 @@ Documentación del paquete LaTeX
\begin_inset CommandInset href
LatexCommand href
name "caption"
target "ftp://tug.ctan.org/pub/tex-archive/macros/latex/contrib/caption/caption.pdf"
target "http://mirrors.ctan.org/macros/latex/contrib/caption/caption-eng.pdf"
\end_inset

View File

@ -445,7 +445,7 @@ En el archivo
\begin_inset CommandInset href
LatexCommand href
name "amsguide.ps"
target "ftp://ctan.tug.org/tex-archive/macros/amstex/doc/amsguide.ps"
target "ftp://ftp.ams.org/pub/tex/doc/amstex/amsguide.pdf"
\end_inset
@ -38780,7 +38780,7 @@ key "AMS"
\begin_inset CommandInset href
LatexCommand href
name "Descripción"
target "ftp://ftp.ams.org/pub/tex/doc/amsmath/amsldoc.pdf"
target "http://mirrors.ctan.org/macros/latex/required/amslatex/math/amsldoc.pdf"
\end_inset

View File

@ -46179,7 +46179,7 @@ Documentation du paquetage LaTeX
\begin_inset CommandInset href
LatexCommand href
name "caption"
target "ftp://tug.ctan.org/pub/tex-archive/macros/latex/contrib/caption/caption.pdf"
target "http://mirrors.ctan.org/macros/latex/contrib/caption/caption-eng.pdf"
\end_inset

View File

@ -476,7 +476,7 @@ dans le fichier
\begin_inset CommandInset href
LatexCommand href
name "amsguide.ps"
target "ftp://ctan.tug.org/tex-archive/macros/amstex/doc/amsguide.ps"
target "ftp://ftp.ams.org/pub/tex/doc/amstex/amsguide.pdf"
\end_inset
@ -38524,7 +38524,7 @@ key "AMS"
\begin_inset CommandInset href
LatexCommand href
name "Description"
target "ftp://ftp.ams.org/pub/tex/doc/amsmath/amsldoc.pdf"
target "http://mirrors.ctan.org/macros/latex/required/amslatex/math/amsldoc.pdf"
\end_inset

View File

@ -41523,7 +41523,7 @@ LaTeXパッケージ
\begin_inset CommandInset href
LatexCommand href
name "caption"
target "ftp://tug.ctan.org/pub/tex-archive/macros/latex/contrib/caption/caption.pdf"
target "http://mirrors.ctan.org/macros/latex/contrib/caption/caption-eng.pdf"
\end_inset

View File

@ -495,7 +495,7 @@ AmS
\begin_inset CommandInset href
LatexCommand href
name "amsguide.ps"
target "ftp://ctan.tug.org/tex-archive/macros/amstex/doc/amsguide.ps"
target "ftp://ftp.ams.org/pub/tex/doc/amstex/amsguide.pdf"
\end_inset
@ -37777,7 +37777,7 @@ AmS
\begin_inset CommandInset href
LatexCommand href
name "説明"
target "ftp://ftp.ams.org/pub/tex/doc/amsmath/amsldoc.pdf"
target "http://mirrors.ctan.org/macros/latex/required/amslatex/math/amsldoc.pdf"
\end_inset

View File

@ -327,7 +327,7 @@ status collapsed
\begin_layout Plain Layout
\begin_inset CommandInset href
LatexCommand href
target "ftp://ftp.dante.de/tex-archive/macros/latex/contrib/koma-script/scrguide.pdf"
target "http://mirrors.ctan.org/macros/latex/contrib/koma-script/doc/scrguide.pdf"
\end_inset

View File

@ -276,7 +276,7 @@ status collapsed
\begin_layout Plain Layout
\begin_inset CommandInset href
LatexCommand href
target "ftp://ftp.dante.de/tex-archive/macros/latex/contrib/koma-script/scrguide.pdf"
target "http://mirrors.ctan.org/macros/latex/contrib/koma-script/doc/scrguide.pdf"
\end_inset

View File

@ -329,7 +329,7 @@ status collapsed
\begin_layout Plain Layout
\begin_inset CommandInset href
LatexCommand href
target "ftp://ftp.dante.de/tex-archive/macros/latex/contrib/koma-script/scrguide.pdf"
target "http://mirrors.ctan.org/macros/latex/contrib/koma-script/doc/scrguide.pdf"
\end_inset

View File

@ -1981,7 +1981,7 @@ status collapsed
\begin_layout Plain Layout
http://media.texample.net/tikz/examples/TEX/free-body-diagrams.tex
http://www.texample.net/media/tikz/examples/TEX/free-body-diagrams.tex
\end_layout
\end_inset