Have you seen this post by @robin.newman? I think it sounds quite close to what you want, so it might be a good starting point.
Have you seen this post by @robin.newman? I think it sounds quite close to what you want, so it might be a good starting point.