patches/wv-02-w3m-dump.diff
changeset 492 5c737a73fcd0
parent 489 68595c833e01
--- a/patches/wv-02-w3m-dump.diff	Wed Sep 19 02:07:35 2007 +0000
+++ b/patches/wv-02-w3m-dump.diff	Wed Sep 19 06:10:18 2007 +0000
@@ -35,25 +35,15 @@
  	echo "Using wvWare -x wvText.xml. Ouput will be pretty bad."
  fi
  
-@@ -45,7 +50,7 @@
-     fi
- 
-     # intermediate file
--    TMP_FILE=`mktemp "$tmpdir/wv-XXXXXX"`
-+    TMP_FILE=`mktemp "$tmpdir/wv-XXXXXX.html"`
-     TMP_FILE=`basename "$TMP_FILE"`
- 
-     wvHtml -1 "${1}" --targetdir="${tmpdir}" "${TMP_FILE}" >/dev/null 2>&1
-@@ -54,8 +59,11 @@
+@@ -54,7 +59,10 @@
  	exit 1
      fi
  
 -    if [ $USE_DUMP -eq "3" ]; then
 +    if [ $USE_DUMP -eq "4" ]; then
++	# w3m
++	w3m -T text/html -dump "${tmpdir}/${TMP_FILE}" > "${2}"
++    elif [ $USE_DUMP -eq "3" ]; then
  	# elinks does the best
-+	w3m -dump "${tmpdir}/${TMP_FILE}" > "${2}"
-+    elif [ $USE_DUMP -eq "3" ]; then
-+	# elinks does the best
  	elinks -dump -force-html "${tmpdir}/${TMP_FILE}" > "${2}"
      elif [ $USE_DUMP -eq "2" ]; then
- 	# links does a pretty good job