All pastes #495386 Raw Edit

PHP Doc Generator

public shellscript v1 · immutable
·published 2007-05-18 18:54 UTC
rendered paste body
#!/bin/bashfor i in *.php; do        # Show the main classes of the core .php files, if any    if [ `(grep ^class $i | wc -l)` -gt 0 ]; then        echo +++ [ApiCore$i `(cat $i |grep ^class | sed -e 's/class \([a-zA-Z0-9_]*\).*/\1/')`] | sed -e 's/\([a-zA-Z]*\)\.php/\1/g' -e 's/\[\([a-zA-Z0-9_]*\) \([a-zA-Z0-9_]*\) .*\]/[\1 \2]/'    fi    # Show any subclasses in the core .php files, if any    if [ `(grep ^class $i | wc -l)` -gt 1 ]; then        for j in `(grep ^class $i | sed -e 's/class \([a-zA-Z0-9_]*\).*/\1/')`; do            if [ -n "$blah" ]; then                 echo ++++ [ApiCore$j $j] | sed -e 's/_//'            else                blah='skipped'            fi        done        blah=''    fidone