~ubuntu-branches/ubuntu/trusty/postfix/trusty-proposed

« back to all changes in this revision

Viewing changes to mantools/html2readme

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2005-02-27 09:33:07 UTC
  • Revision ID: james.westby@ubuntu.com-20050227093307-cn789t27ibnlh6tf
Tags: upstream-2.1.5
ImportĀ upstreamĀ versionĀ 2.1.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
HTML2TEXT="html2text -style pretty -rcfile html2text.rc"
 
4
 
 
5
#case $# in
 
6
# 0) $HTML2TEXT;;
 
7
# *) for file 
 
8
#    do
 
9
#        cat <<EOF | fmt
 
10
#[hyperlinked version: www.postfix.org/$file]
 
11
#EOF
 
12
#         $HTML2TEXT $file
 
13
#    done;;
 
14
#esac | sed '
 
15
 
 
16
$HTML2TEXT "$@" | sed '
 
17
:top
 
18
/ -$/ {
 
19
        N
 
20
        s/ -\n  o/ -o/
 
21
        b top
 
22
}
 
23
' | awk '
 
24
/^$/ && prev_len == 0 { next }
 
25
                      { print; prev_len = length }
 
26
'