mephisto comment regex filter

October 28th, 2007

I finally got annoyed enough at the spammer posting comments on this blog to do something about it. The spammer was consistently posting comments with ^t\d+t$ in some part of the form. Normally I don't actually get bothered by this, as Akismet generally marks those comments as unapproved. In this case, about 1000 got through per day for two days. Each one of those generated an email notifying me of the valid comment. That sucks. So I've created a simple mephisto plugin that prevents the comment from being posted if any field matches a regex. Bugtracking and such are locally hosted in the usual spot. You can install or just get the code from svn://hasno.info/mephisto/plugins//mephisto_comment_regex/ or http://svn.hasno.info/svn/mephisto/plugins/mephisto_comment_regex/. This has only been tested with edge mephisto, ymmv with anything else.

Just in case someone wants to use this and isn't familiar with the rails plugin command line: ./script/plugin install svn://hasno.info/mephisto/plugins//mephisto_comment_regex/

mephisto post pinger update

September 9th, 2007

I've added support for section and tag based filtering to the post pinger. This was inspired/prompted by hank's work adding tag based filtering to limit his postings to ruby based sites. I thought it was a great idea so it's now in the plugin trunk. The plugin works vs the mephisto trunk as of today, no guarantees about tomorrow though.

The post pinger is a mephisto plugin that will send xmlrpc/rest pings to aggregation/notification sites when you create an article. Slightly more info is available here. As per usual you can get the plugin from: svn://hasno.info/mephisto/plugins/mephisto_post_ping.

After doing a little profiling (not that it was necessary) I found that REXML was the source of the lag in feed parsing. The obvious solution is to switch from REXML to some other xml parser. Having using libxml for c projects, I must admit a deep dislike of the API. The ruby-libxml interface does nothing to hide this api, and was therefore of out the running. So that left me with hpricot, which is has a great api and can parse xml/html quickly.

At this point I have a feedtools rewrite/replacement sitting in svn://hasno.info/feedtools/trunk, it's currently going by the name FeedEater until such a time as it merges in with feedtools. I've left the interface almost the same, so the regular duckie rules apply. It is MUCH faster than feedtools, but does not to nearly as much. Feedtools attempts to fix any and all issues with feeds, anything from entity conversion to changing feed:// urls into http:// urls. The simple library I've written does none of that. It parses the feed into some ruby objects and spits it back at you. Though I did provide support for caching and have implemented a matching database cache (it basically uses the feedtools cache table).

Since all this feed parsing cruft was done in order to make the mephisto feedreader plugin faster, I've gone ahead and created a branch that uses the new library. You'll find the branch at svn://hasno.info/mephisto/plugins/branches/mephisto_feedreader. Give the library and/or plugin a try.

As a aside, after all this hpricot goodness I've decided that at some point I want to write a ruby-ish hpricot-ish libxml wrapper.

feedreader plugin update

May 15th, 2007

I've updated the feedreader mephisto plugin fixing a serious lack of caching. If you happen to use this plugin to display rss feeds on your blog, I highly suggest getting the current version. I should note that the current version will only work with the mephisto trunk as many plugin architecture changes have happened since the 0.7.3 release. The curious can check the trac instance for more information. At some point I'll get around to modifying the other plugins, I'd like to have them take advantage of the UI based configuration stuff that's been added to mephisto.
I've updating the post ping and feedreader plugins for various reasons. REST ping support was added to the post pinger, along with support for using the ping-o-matic form (instead of xmlrpc). The ping-o-matic form get was conceptualized by Justin Hernandez. The changes to feedreader were a little less useful, the mephisto trunk recently merged some upstream changes to liquid. Those changes included an api change that broke feedreader. I've tagged the plugin versions that work with 0.7.3, you'll find them at svn://hasno.info/mephisto/plugins/tags/0.7.3/<plugin name here>. The original svn url's will work with mephisto trunk.
Merry X-mas.