From c571c1323f3ff42baa31dd4f008d2417ac0f0e76 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Thu, 10 Dec 2009 19:19:15 -0800 Subject: Added intial README --- plugins/RSSCloud/README | 53 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 plugins/RSSCloud/README (limited to 'plugins/RSSCloud/README') diff --git a/plugins/RSSCloud/README b/plugins/RSSCloud/README new file mode 100644 index 000000000..8fd281aab --- /dev/null +++ b/plugins/RSSCloud/README @@ -0,0 +1,53 @@ +This plugin enables RSSCloud (http://rsscloud.org/) publishing and +subscription handling for RSS 2.0 profile feeds (i.e: +http://SITE/PATH/api/statuses/user_timeline/USERNAME.rss). When the +plugin is enabled, StatusNet acts as both the publisher and hub ('writer' and +'cloud' in RSSCloud parlance), but only for local StatusNet feeds. It's +not possible to use it as a general purpose hub -- for instance you can't +subscribe and get updates to a Wordpress feed from StatusNet. + +To use the plugin, add the following to your config.php: + + addPlugin('RSSCloud'); + +Enabling the plugin will add a element to your RSS 2.0 profile feeds +that looks like this: + + + +Aggregators may subscribe by sending a proper REST RSSCloud subscription +request (the optional 'domain' parameter with challenge is supported). +Subscribing aggregators will be notified ('pinged') when users they have +subscribed to post new notices. Currently, REST is the only protocol +supported for notifications. + +Deamon +------ + +There's also a daemon for offline processing of queued notices with +RSSCloud destinations, which will start automatically if/when you run +scripts/startdaemons.sh. + +Notes +----- + +- Again, only RSS 2.0 profile feeds may be subscribed to, and they have + be the ones with user names in them, like: + http://SITE/PATH/api/statuses/user_timeline/USERNAME.rss +- Subscriptions are deleted after three notification failures in a row + (not sure this is optimal). +- The plugin includes a dummy LoggingAggregator class that can be used + for end-to-end testing. You probably don't want to mess with it. + +TODO +---- + +- Figure out why the RSSCloudSubcription can't ->delete() or ->update() +- Support pinging via XML-RPC and SOAP +- Automatically delete subscriptions? Point of reference: Dave's hub + implementation auto-deletes them after 25 hours. WordPress never deletes them. +- Support additional feed URL addresses for the same feed (e.g.: by numeric ID, + ?user_id=xxx, etc.) +- Support additional feeds that make sense (e.g: replies)? +- Possibly use "rssCloud" (like Dave) instead of "RSSCloud" everywhere -- cgit v1.2.3-54-g00ecf From c95114ea02757cf114ae34f33c9a7cacee49a8da Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Wed, 6 Jan 2010 07:44:34 +0000 Subject: Some better log msgs --- plugins/RSSCloud/README | 5 +++-- plugins/RSSCloud/RSSCloudRequestNotify.php | 17 ++++++++++++----- 2 files changed, 15 insertions(+), 7 deletions(-) (limited to 'plugins/RSSCloud/README') diff --git a/plugins/RSSCloud/README b/plugins/RSSCloud/README index 8fd281aab..1237e3e0e 100644 --- a/plugins/RSSCloud/README +++ b/plugins/RSSCloud/README @@ -4,7 +4,8 @@ http://SITE/PATH/api/statuses/user_timeline/USERNAME.rss). When the plugin is enabled, StatusNet acts as both the publisher and hub ('writer' and 'cloud' in RSSCloud parlance), but only for local StatusNet feeds. It's not possible to use it as a general purpose hub -- for instance you can't -subscribe and get updates to a Wordpress feed from StatusNet. +subscribe and get updates to a Wordpress feed from StatusNet using this +plugin. To use the plugin, add the following to your config.php: @@ -33,7 +34,7 @@ Notes ----- - Again, only RSS 2.0 profile feeds may be subscribed to, and they have - be the ones with user names in them, like: + to be the ones with user names in them, like: http://SITE/PATH/api/statuses/user_timeline/USERNAME.rss - Subscriptions are deleted after three notification failures in a row (not sure this is optimal). diff --git a/plugins/RSSCloud/RSSCloudRequestNotify.php b/plugins/RSSCloud/RSSCloudRequestNotify.php index a648efff1..d76c08d37 100644 --- a/plugins/RSSCloud/RSSCloudRequestNotify.php +++ b/plugins/RSSCloud/RSSCloudRequestNotify.php @@ -137,6 +137,11 @@ class RSSCloudRequestNotifyAction extends Action foreach ($this->feeds as $feed) { if (!$this->validateFeed($feed)) { + + $nh = $this->getNotifyUrl(); + common_log(LOG_WARNING, + "RSSCloud plugin - $nh tried to subscribe to invalid feed: $feed"); + $msg = 'Feed subscription failed - Not a valid feed.'; $this->showResult(false, $msg); return; @@ -216,8 +221,6 @@ class RSSCloudRequestNotifyAction extends Action function testNotificationHandler($feed) { - common_debug("RSSCloudPlugin - testNotificationHandler()"); - $notifyUrl = $this->getNotifyUrl(); $notifier = new RSSCloudNotifier(); @@ -226,12 +229,13 @@ class RSSCloudRequestNotifyAction extends Action // 'domain' param set, so we have to use GET and send a challenge - common_log(LOG_INFO, 'Testing notification handler with challenge: ' . + common_log(LOG_INFO, + 'RSSCloud plugin - Testing notification handler with challenge: ' . $notifyUrl); return $notifier->challenge($notifyUrl, $feed); } else { - common_log(LOG_INFO, 'Testing notification handler: ' . + common_log(LOG_INFO, 'RSSCloud plugin - Testing notification handler: ' . $notifyUrl); return $notifier->postUpdate($notifyUrl, $feed); @@ -298,7 +302,8 @@ class RSSCloudRequestNotifyAction extends Action $sub = RSSCloudSubscription::getSubscription($user->id, $notifyUrl); if ($sub) { - common_debug("Already subscribed to that!"); + common_log(LOG_INFO, "RSSCloud plugin - $notifyUrl refreshed subscription" . + " to user $user->nickname (id: $user->id)."); } else { $sub = new RSSCloudSubscription(); @@ -312,6 +317,8 @@ class RSSCloudRequestNotifyAction extends Action return false; } + common_log(LOG_INFO, "RSSCloud plugin - $notifyUrl subscribed" . + " to user $user->nickname (id: $user->id)"); } return true; -- cgit v1.2.3-54-g00ecf