Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (20 sloc) 0.693 kb
#!/bin/bash
if [ "$1" ]; then
export docpath="$1"
else
export docpath="$ANDROID_SDK_PATH/docs/reference"
fi
echo "<deprecated basepath='$docpath'>"
for f in `find $docpath -name *.html`
do
export len=`expr length "$docpath" + 1`
echo "<file name='${f:$len}'>"
echo "<fields>"
xmllint --html --xmlout $f 2>/dev/null | xmlstarlet sel -t -c "//p[@class='caution']/../../h4[@class='jd-details-title']/text()"
echo "</fields>"
echo "<methods>"
xmllint --html --xmlout $f 2>/dev/null | xmlstarlet sel -t -c "//p[@class='caution']/ancestor::div[h4/@class='jd-details-title' and h4/span/@class='sympad']/h4/descendant::text()"
echo "</methods>"
echo "</file>"
done
echo "</deprecated>"
Jump to Line
Something went wrong with that request. Please try again.