From d8d9e66dfa3b093288488db09e7a55cb0ce1de16 Mon Sep 17 00:00:00 2001 From: Uriel Date: Mon, 20 Jul 2009 04:01:36 +0000 Subject: [PATCH] Further work on pubsubhub support. I think we now have all we are supposed to, but I'm not sure it works yet. --- apps/blagh/app.rc | 9 +++++---- apps/blagh/atom.tpl | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/blagh/app.rc b/apps/blagh/app.rc index 1aea00f..8536b4b 100644 --- a/apps/blagh/app.rc +++ b/apps/blagh/app.rc @@ -120,10 +120,11 @@ fn mkbpost { echo $bptext }> $ddir/$"n^$"bpid/index.md - if(! ~ $"blagh_pubsubdub_hub '') { - # Experimental implementation of http://pubsubhubbub.googlecode.com/svn/trunk/pubsubhubbub-core-0.1.html#anchor4 - ifs='' { p=`{echo $req_url|sed 's/new_post$/index.atom/'|./bin/contrib/urlencode.awk } - hget -p 'hub.mode=publish&hub.url='^$p' $blagh_pubsubdub_hub + # Experimental support for http://pubsubhubbub.googlecode.com/ + if(! ~ $"conf_blog_pubsubdub_hub '') { + ifs='' { p=`{echo $req_url|sed 's/new_post$/index.atom/'|url_encode } } + dprint hget -p 'hub.mode=publish&hub.url='^$"p $conf_blog_pubsubdub_hub + hget -d -h -p 'hub.mode=publish&hub.url='^$"p $conf_blog_pubsubdub_hub >[1=2] } } status=$_status diff --git a/apps/blagh/atom.tpl b/apps/blagh/atom.tpl index e31b32e..7bf32c6 100644 --- a/apps/blagh/atom.tpl +++ b/apps/blagh/atom.tpl @@ -22,8 +22,8 @@ updated = `{/bin/date --rfc-3339'=seconds' |sed 's/ /T/'} -% if(! ~ $"blagh_pubsubdub_hub '') { -% echo '' +% if(! ~ $"conf_blog_pubsubdub_hub '') { +% echo '' % }