Skip to content

Commit

Permalink
updating docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Ullah committed Jun 10, 2020
1 parent 0bbe2f9 commit 9dba3f3
Show file tree
Hide file tree
Showing 3 changed files with 520 additions and 153 deletions.
20 changes: 20 additions & 0 deletions grass7/raster/r.landscape.evol/fixgrassdocs.sh
@@ -0,0 +1,20 @@
#!/bin/bash
## Converts an html file generated from markdown into
## the format expected for GRASS documentation.
## Specifcally, html tags are converted to expected
## ones, and unacceptable tags are removed. Lines are
## then wrapped at 80 chars.
if [ "$1" == "-h" ] || [ $# -eq 0 ] ; then
echo "Converts an html file generated from markdown
into the format expected for GRASS documentation."
echo "Usage: `basename $0` inputfile.html [-h]"
exit 0
fi
tf=$!"tmp.txt"
sed -r -i 's|<head>.*</head>||g' $1
sed -r -i 's|<(/)?html>||g' $1
sed -r -i 's|<(/)?body>||g' $1
sed -r 's|<(/)?strong>|<\1b>|g' $1 >$tf
fmt -w 80 $tf >$1
rm -f $tf

0 comments on commit 9dba3f3

Please sign in to comment.