#!/bin/bash set -e IN=${1:-README.md} OUT=${2:-README} fgrep -v "[Build Status]" $IN \ | fgrep -v "ArangoDB-Logo" \ | fgrep -v "[Build Status]" \ | markdown \ | html2text -style compact -nobs \ | sed -e 's:>:>:g' \ | awk 'BEGIN { s = 0; } { if (length($0) == 0) {if (s != 0) print $0;} else {s = 1; print $0; }}' \ > $OUT