1 # Backend to convert something into ASCII text
2 # Send any comments to Eric Bischoff <eric@caldera.de>
3 # This program is under GPL license. See LICENSE file for details.
5 if [ -x /usr/bin/lynx ]
8 ARGS="-force_html -dump -nolist -width=72"
9 elif [ -x /usr/bin/links ]
11 CONVERT=/usr/bin/links
13 elif [ -x /usr/bin/w3m ]
18 echo >&2 "No way to convert HTML to text found."
22 HTML=$(mktemp /tmp/html-XXXXXX) || exit 1
23 trap 'rm -f "$HTML"; exit' 0 1 2 3 7 13 15
26 $SGML_JADE -V nochunks -t sgml ${SGML_ARGUMENTS} >${HTML}
31 # Convert from HTML to ASCII
32 ${CONVERT} ${ARGS} ${HTML} > "${SGML_FILE_NAME}.txt"