Geographic Resources Analysis Support System, commonly referred to as GRASS, is a Geographic Information System (GIS) used for geospatial data management and analysis, image processing, graphics/maps production, spatial modeling, and visualization. GRASS is currently used in academic and commercial settings around the world, as well as by many governmental agencies and environmental consulting companies.
This reference manual details the use of modules distributed with Geographic Resources Analysis Support System (GRASS), an open source (GNU GPLed), image processing and geographic information system (GIS).
EOF
}
write_html_footer()
{
# $1: unused
# $2: help index url
cat < Help Index | Full Index
© 2003-2008 GRASS Development TeamFull command index:
EOF
#generate main index of all modules:
echo " d.* display commands db.* database commands g.* general commands i.* imagery commands m.* miscellaneous commands ps.* postscript commands r.* raster commands r3.* raster3D commands v.* vector commands nviz visualization suite wxGUI wxPython-based GUI frontend xganim raster map slideshow
[ "
k=0
for i in $CMDLIST
do
k=`expr $k + 1`
echo -n "$i.*"
if [ $k -lt $CMDLISTNO ] ; then
echo -n " | "
fi
done
echo " ]"
echo "
"
echo ""
#for all module groups:
for i in $CMDLIST
do
cat <<-EOF
$i.* commands:
EOF
#for all modules:
for i in `ls -1 $i.*.html | grep -v "\($EXCLUDEHTML\)"`
do
BASENAME=`basename $i .html`
SHORTDESC="`cat $i | awk '/NAME/,/SYNOPSIS/' | grep '' | cut -d'-' -f2- | sed 's+^ ++g' | grep -vi 'SYNOPSIS' | head -n 1`"
check_for_desc_override
echo "
"
done
write_html_footer - index.html
) > "$FULLINDEX.tmp"
replace_file "$FULLINDEX"
# done full index
###############################################################################
#next write separate module pages:
#for all module groups:
for k in $CMDLIST
do
MODCLASS=`expand_module_class_name $k`
FILENAME="$MODCLASS.html"
(
write_html_header - "GRASS GIS $GRASSVERSION Reference Manual: $MODCLASS"
echo "$MODCLASS commands:"
echo " "
done
echo "$BASENAME $SHORTDESC "
#for all modules:
for k in `ls -1 $k.*.html | grep -v "\($EXCLUDEHTML\)"`
do
BASENAME=`basename $k .html`
SHORTDESC="`cat $k | awk '/NAME/,/SYNOPSIS/' | grep '' | cut -d'-' -f2- | sed 's+^ ++g' | grep -vi 'SYNOPSIS' | head -n 1`"
check_for_desc_override
echo "
"
write_html_footer - index.html
) > "$FILENAME.tmp"
replace_file "$FILENAME"
done
###############################################################################
#next write main page:
FILENAME=index.html
(
write_html_header - "GRASS GIS $GRASSVERSION Reference Manual" 1
#modules:
echo " "
done
echo "$BASENAME $SHORTDESC Manual sections:
"
echo ""
#for all module groups:
for k in $CMDLIST
do
MODCLASS=`expand_module_class_name $k`
echo "
EOF
write_html_footer - index.html
) > "$FILENAME.tmp"
replace_file "$FILENAME"
###############################################################################
echo "Generated HTML docs in $HTMLDIR/index.html"
echo "----------------------------------------------------------------------"
echo "Following modules are missing the 'description.html' file in src code:"
for i in `find . -name "*.*.html" | sort | grep -v "$FULLINDEX" | grep -v 'index.html' | grep -v "$EXCLUDEHTML"`
do
if grep 'DESCRIPTION' $i >/dev/null 2>&1 ; then
:
else
echo `echo $i | sed 's?./??' | sed 's/.html//'`
fi
done
echo "----------------------------------------------------------------------"