Improved README
[libdai.git] / scripts / makeREADME
1 #!/bin/bash
2 echo "libDAI - A free/open source C++ library for Discrete Approximate Inference" > README
3 echo >> README
4 echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" >> README
5 echo >> README
6 echo "Version: $DAI_VERSION" >> README
7 echo "Date: $DAI_DATE" >> README
8 echo "See also: http://www.libdai.org" >> README
9 echo >> README
10 w3m -dump doc/html/license.html | awk 'BEGIN {start=0}; $1 ~ /━/ {start=start+1; if (start<2) print $0}; $1 !~ /━/ {if (start>0 && start<2) print $0}' >> README
11 echo "You should have received a copy of the GNU General Public License" >> README
12 echo "along with libDAI in the file COPYING. If not, see http://www.gnu.org/licenses/" >> README
13 echo >> README
14 w3m -dump doc/html/citations.html | awk 'BEGIN {start=0}; $1 ~ /━/ {start=start+1; if (start<2) print $0}; $1 !~ /━/ {if (start>0 && start<2) print $0}' >> README
15 w3m -dump doc/html/index.html | awk 'BEGIN {start=0}; $1 ~ /━/ {start=start+1; if (start<2) print $0}; $1 !~ /━/ {if (start>0 && start<2) print $0}' >> README
16 w3m -dump doc/html/build.html | awk 'BEGIN {start=0}; $1 ~ /━/ {start=start+1; if (start>0 && start<5) print $0}; $1 !~ /━/ {if (start>0 && start<5) print $0}' >> README
17 sed -i 's/━/-/g' README
18 sed -i 's/•/*/g' README