X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=html2text.sh;h=fe10cc043e71b8ecaf2c07dc55aff5f1a983abce;hb=0c7aaabde9bf206dd017f468bf5af86e2efb22dd;hp=8c29b109f2b668d90c61969521a096ffc490b57f;hpb=8dfa1963e55ead8a842115a970fc3f99a1803cc6;p=scripts.git diff --git a/html2text.sh b/html2text.sh index 8c29b10..fe10cc0 100755 --- a/html2text.sh +++ b/html2text.sh @@ -1,20 +1,28 @@ #!/bin/bash -################################################################## -# START_IP_HEADER # -# # -# Written by Francois Fleuret # -# Contact for comments & bug reports # -# # -# END_IP_HEADER # -################################################################## +######################################################################### +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the version 3 of the GNU General Public License # +# as published by the Free Software Foundation. # +# # +# This program is distributed in the hope that it will be useful, but # +# WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # +# General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see . # +# # +# Written by and Copyright (C) Francois Fleuret # +# Contact for comments & bug reports # +######################################################################### set -e echo "(From html)" +echo elinks -no-numbering -no-references -dump -dump-width 80 -dump-charset utf-8 | \ sed -e "s/\[IMG\]//g" -e "s/^[ \t]*$//" -e "s/^ //" | \ awk '/^$/{ if (! blank++) print; next } { blank=0; print }' - # | \ - # sed -e "s/^ *//" +