1
0
mirror of https://github.com/irssi/irssi.git synced 2024-10-27 05:20:20 -04:00

Disable -nolinks for lynx-generated text FAQ

This way lynx also emits URLs for references at the bottom,
like elinks does.

The formating is a little different though (word wrapping),
and elinks adds a "Visible links" line as well.
This commit is contained in:
François Revol 2014-07-22 19:55:44 +02:00
parent 5ddf127f6d
commit 7099ae0466

View File

@ -28,7 +28,7 @@ cat docs/help/Makefile.am.gen|sed "s/@HELPFILES@/$files/g"|sed 's/?/\\?/g'|tr '!
# .html -> .txt with lynx or elinks # .html -> .txt with lynx or elinks
echo "Documentation: html -> txt..." echo "Documentation: html -> txt..."
if type lynx >/dev/null 2>&1 ; then if type lynx >/dev/null 2>&1 ; then
lynx -dump -nolist docs/faq.html|perl -pe 's/^ *//; if ($_ eq "\n" && $state eq "Q") { $_ = ""; } elsif (/^([QA]):/) { $state = $1 } elsif ($_ ne "\n") { $_ = " $_"; };' > docs/faq.txt lynx -dump docs/faq.html|perl -pe 's/^ *//; if ($_ eq "\n" && $state eq "Q") { $_ = ""; } elsif (/^([QA]):/) { $state = $1 } elsif ($_ ne "\n") { $_ = " $_"; };' > docs/faq.txt
elif type elinks >/dev/null 2>&1 ; then elif type elinks >/dev/null 2>&1 ; then
elinks -dump docs/faq.html|perl -pe 's/^ *//; if ($_ eq "\n" && $state eq "Q") { $_ = ""; } elsif (/^([QA]):/) { $state = $1 } elsif ($_ ne "\n") { $_ = " $_"; };' > docs/faq.txt elinks -dump docs/faq.html|perl -pe 's/^ *//; if ($_ eq "\n" && $state eq "Q") { $_ = ""; } elsif (/^([QA]):/) { $state = $1 } elsif ($_ ne "\n") { $_ = " $_"; };' > docs/faq.txt
else else