# get text_document content from remote server
# $1 = path to this document
wget -o wget.log --http-user='root' --http-passwd='aaa' \
"http://10.10.14.41/co/purejavascript/sys/catalog?getIdByPath&par_id=1&par_area=sys&par_class=catalog&id_root=1&path=$1&callback=show_int(" \
--output-document=tmp.js
OBJID=`./js -f lib.js tmp.js`
echo "OBJID=$OBJID"
wget -o wget.log --http-user='root' --http-passwd='aaa' \
"http://10.10.14.41/co/purejavascript/sys/catalog?getProp&par_area=sys&par_class=catalog&par_id=$OBJID&prop_name=id_item&callback=show_int(" \
--output-document=tmp.js
OBJID=`./js -f lib.js tmp.js`
echo "OBJID=$OBJID"
wget -o wget.log --http-user='root' --http-passwd='aaa' \
"http://10.10.14.41/co/html/sys/text_document?getFile&par_area=sys&par_class=text_document&par_id=$OBJID" \
--output-document=tmp.txt
cat tmp.txt
echo