/[debian]/nanobloggertrackback/branches/upstream/current/trackbackping.sh
ViewVC logotype

Contents of /nanobloggertrackback/branches/upstream/current/trackbackping.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 164 - (show annotations)
Sat Feb 25 18:13:56 2006 UTC (15 years, 5 months ago) by gregoa
File MIME type: application/x-sh
File size: 873 byte(s)
[svn-inject] Installing original source of nanobloggertrackback
1 # sends trackback pings to URLs found in $NB_EntryBody
2 # needs SEND_TRACKBACK_PING="1" und TB_PATH in blog.conf
3
4 PINGCACHE=${BLOG_DIR}/tb/pings/${NB_EntryID}
5
6 if [ "$SEND_TRACKBACK_PING" = "1" ] && [ ! -z "$TB_PATH" ]; then
7 if [ ! -e "$PINGCACHE" ]; then
8 for URL in $(echo $NB_EntryBody | perl -ne 'print "$1\n" if /href=\C(.*?)\C>/g'); do
9 nb_msg "sending trackback pings ..."
10 PING_URL=$URL
11 TITLE=$NB_EntryTitle
12 BLOG_NAME=$BLOG_TITLE
13 EXCERPT=$(echo $NB_EntryBody | perl -ne 'print "$1 ..." if /^(.{1,80})(\s+|$)/' | html2text -nobs | xargs)
14 URL=${ARCHIVES_PATH}$NB_EntryPermalink
15 TBURL="${TB_PATH}?__mode=send_ping&ping_url=${PING_URL}&title=${TITLE}&blog_name=${BLOG_NAME}&excerpt=${EXCERPT}&url=${URL}"
16 TBURL=$(echo $TBURL | sed -e 's/!/\\!/')
17 #nb_msg "++ $TBURL"
18 /usr/bin/wget -q -O /dev/null "$TBURL"
19 touch $PINGCACHE
20 done
21 fi
22 fi

  ViewVC Help
Powered by ViewVC 1.1.26