File: html2txt

package info (click to toggle)
deutex 4.4.902-13
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,120 kB
  • sloc: ansic: 10,794; sh: 424; makefile: 340; perl: 145; csh: 4
file content (18 lines) | stat: -rwxr-xr-x 378 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
#
#	html2txt - convert an HTML document to text
#	AYM 2005-08-28
#

if [ "$#" != 1 ]
then
  echo "Usage: html2txt file" >&2
  exit 1
fi

set -e
echo 'THIS IS A GENERATED FILE -- DO NOT EDIT !'
printf 'Edit %s instead.\n\n' "$1"
# First time is to catch errors
links -dump-width 87 -dump "$1" >/dev/null
links -dump-width 87 -dump "$1" | sed 's/^   //; s/^         //'