dobrado now supports PubSubHubbub, both as a consumer and as a producer. Thankfully this process is similar enough to rssCloud that it can share a lot of existing code.
To make it work with microformat feeds, I needed to add a couple of lines to SimplePie. This is because the rel=hub and rel=self links otherwise parsed in the xml need to be discovered in the headers. Since SimplePie caches all headers, they can just be returned in get_links(), so the code calling this function doesn't need to know what type of feed it is.
Talk on indiewebcamp irc this week was (as always) a good motivator to add some more features to dobrado. This time it was support for deleted posts.
The first addition was actually to SimplePie microformats parsing, which now looks for a deleted property in an h-entry. When it finds it, the content and title for the entry are set to empty strings which triggers my reader code to delete it. I haven't pushed this change to official SimplePie yet, but you can test deleting a post and watching it get removed from a feed here at unicyclic.com/indieweb. (Unfortunately there's no PuSH support yet, so updates only occur once every hour.)
The other feature I added was to delete a comment when receiving a webmention and the status code when verifying the source is 410.
I've just released version 1.4 of the feed reading library, SimplePie. It's the first official release in 3 and a half years, so includes a large number of bug fixes.
It also includes a number of new features, such as the ability to pass options through to curl, and support for a new caching back ends.
My favorite new feature however is support for new types of feeds as described by the IndieWebCamp community. These feeds are made up of h-feed and h-entry microformats, which allows the feed to be parsed from the html rather than a separate xml file. SimplePie will now detect when it finds such a feed and parse them when it finds the php-mf2 parser available. (This just means including php-mf2 wherever you include SimplePie.)
There aren't too many feed reading libraries capable of parsing traditional feeds, as well the new microformats based html feeds that are being explored. If you're interested in building yourself a reader that can do both SimplePie 1.4 is worth a look.
(...and fixing it.)
PuSH support in dobrado #indieweb
To make it work with microformat feeds, I needed to add a couple of lines to SimplePie. This is because the rel=hub and rel=self links otherwise parsed in the xml need to be discovered in the headers. Since SimplePie caches all headers, they can just be returned in get_links(), so the code calling this function doesn't need to know what type of feed it is.
deleted post support in dobrado #indieweb
The first addition was actually to SimplePie microformats parsing, which now looks for a deleted property in an h-entry. When it finds it, the content and title for the entry are set to empty strings which triggers my reader code to delete it. I haven't pushed this change to official SimplePie yet, but you can test deleting a post and watching it get removed from a feed here at unicyclic.com/indieweb. (Unfortunately there's no PuSH support yet, so updates only occur once every hour.)
The other feature I added was to delete a comment when receiving a webmention and the status code when verifying the source is 410.
Registration for IndieWeb Summit is open! http://2016.indieweb.org Pretty thrilled to be doing this for the 6th year in PDX!
testing webmention.rocks
SimplePie 1.4
It also includes a number of new features, such as the ability to pass options through to curl, and support for a new caching back ends.
My favorite new feature however is support for new types of feeds as described by the IndieWebCamp community. These feeds are made up of h-feed and h-entry microformats, which allows the feed to be parsed from the html rather than a separate xml file. SimplePie will now detect when it finds such a feed and parse them when it finds the php-mf2 parser available. (This just means including php-mf2 wherever you include SimplePie.)
There aren't too many feed reading libraries capable of parsing traditional feeds, as well the new microformats based html feeds that are being explored. If you're interested in building yourself a reader that can do both SimplePie 1.4 is worth a look.