blob: 7da18b68a0b75f682e1a49c74f5b2e549a64eaf0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
|