#!/bin/bash
#
# Usage: html-to-text input encoding
#
# This is just a layer of indirection so the html-to-text utility can
# be changed in a central location.

in="$1"
encoding=$2

#exec elinks -dump -dump-charset $encoding -no-references -no-numbering "$in"
DIR=$(dirname $0)
exec html2text -width 80 -utf8 -nobs -rcfile "$DIR/aptitude-txt.style" "$1"

# html2text has -ascii and -utf8 encodings only
# aptitude documentation is in iso-8859-1 (en) and utf-8 (rest of languages)
# so we can assume utf-8 for all of them
