Just quickly whipped this up from posts in the mailing list.
It needs tidying up. When I get some spare time(maybe november) ,I'll add some more code