summaryrefslogtreecommitdiff
path: root/Master/Tools/htmltext
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2005-12-28 00:04:28 +0000
committerKarl Berry <karl@freefriends.org>2005-12-28 00:04:28 +0000
commite6faeef3e4205722d36bbbb86b3b3390ab6527be (patch)
treeb6bf2abd8e881f40beaca430df2e1c34c02c19ab /Master/Tools/htmltext
parent577983747d8680b8defbfdd03a9d50bad6fd54b7 (diff)
trunk
git-svn-id: svn://tug.org/texlive/trunk@5 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/Tools/htmltext')
-rwxr-xr-xMaster/Tools/htmltext23
1 files changed, 23 insertions, 0 deletions
diff --git a/Master/Tools/htmltext b/Master/Tools/htmltext
new file mode 100755
index 00000000000..7da18b68a0b
--- /dev/null
+++ b/Master/Tools/htmltext
@@ -0,0 +1,23 @@
+#!/bin/sh
+# $Id: //depot/Master/Tools/htmltext#3 $ $Date: 2005/05/29 $ $Author: karl $
+# Public domain. Originally written 2003, Karl Berry.
+# Dump a url (or -stdin) to text using lynx.
+
+PATH=/usr/local/bin:$PATH
+
+HOME=/tmp; export HOME
+TERM=vt100; export TERM
+: ${LYNX_CFG=/home/tug/.lynxcfg}; export LYNX_CFG
+# just contains the line JUSTIFY:FALSE.
+
+test $# -eq 0 && set - -stdin
+
+for url in "$@"; do
+ # when we add -width=79, tables are formatted badly.
+ # -dump lists url's like this with -stdin (lynx 2.8.4, linux):
+ # file://localhost/tmp/89inmk/FAQ/german
+ # Since the reference list is useful, we fix it up by hand instead of
+ # using -nolist.
+ lynx -dump -nocolor -hiddenlinks=ignore "$url" \
+ | sed 's,file://localhost/tmp/[a-zA-Z0-9]*/,,'
+done