# KEHOME/bin/html2ho
# rhm Oct/15/2002

# html2ho file.html ...
# get href URLs from HTML file
# keep ulabel as comment
# output format:
#	/ url # ulabel

for fin in "$@"; do
    hname="${fin}"
    base="${fin%.html}"
    base="${base%.htm}"
    furl="${base}.url"
    fout="${base}.ho"

    html2url.ksh "$fin"

    echo "${hname}.hi is begin hierarchy" >"$fout"
    echo "$hname"			>>"$fout"
    cat  "$furl"	|
    sed  's/"; /" # /'	|
    sed  's,^,/   ,' 	>>"$fout"
    echo "end hierarchy ${hname}.hi"	>>"$fout"
done
