#!/bin/bash # THIS would be much easier with a ruby script that parsed each .h/.cpp pair # and created a row. # echo "" echo " " echo " libigl auto-documentation" echo ' ' echo " " echo " " echo "
" echo "
" echo "
" echo " igl logo" echo "

libigl

" echo " Automatically generated documentation for libigl." echo "

Headers:

" echo " " echo " " echo " " echo " " echo " " # loop over all headers odd="0" HEADERS=`ls include/igl/*.h | \ ruby -ne 'puts $_.split("").map{|e| (e>="a"?e.upcase():e.downcase())}.join' | \ sort | \ ruby -ne 'puts $_.split("").map{|e| (e>="a"?e.upcase():e.downcase())}.join'` for h in $HEADERS do b=`basename $h` # only consider files that exist as proper .h/.cpp files (Those that don't # are mostly utilitarian or poorly written) if [ -e "${h%.h}.cpp" ] then printf " " # portion of file inside namespace html_nsp=`cat $h | \ perl -ne 'BEGIN{$p = 0} $o=$p;$p ^= $_=~"[{}]";print if $o && $p;' | \ sed -e "s//\>/g" | sed -e "s/%/%%/g" | \ sed -e "s/^\( *[^ \/].*\)$/
\1<\/code><\/pre>/g" |  \
      sed -e ':a' -e 'N' -e '$!ba' -e 's/<\/code><\/pre>\n
/\\\n/g' | \
      sed -e "s/^\(.*[^ ].*\)$/\1
/g"`; printf "
" # Try to find functions and corresponding comments echo "" odd=`echo "($odd+1)%2" | bc` fi done echo "
.h fileFunctions
$b$html_nsp
" echo "

See also: tutorial, style guidelines, file formats

" echo "

Automatically generated on `date` by scripts/doc.sh.

" echo "
" echo "
" echo "
" echo " " echo ""