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

Annotation of /nanobloggertrackback/branches/upstream/0.2.4/trackbackping.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 207 - (hide annotations)
Sat Apr 29 15:00:27 2006 UTC (15 years, 4 months ago) by gregoa
Original Path: nanobloggertrackback/branches/upstream/current/trackbackping.sh
File MIME type: application/x-sh
File size: 889 byte(s)
Load /tmp/tmp.4vw2vi/nanobloggertrackback-0.2.2 into
debian/nanobloggertrackback/branches/upstream/current.

1 gregoa 164 # 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 gregoa 207 EXCERPT=$(echo $NB_EntryBody | perl -ne 'print "$1 ..." if /^(.{1,80})(\s+|$)/' | html2text -nobs | xargs -0 | head -n -1)
14 gregoa 164 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