You want crowbar + solvent:
http://simile.mit.edu/wiki/Crowbar
http://simile.mit.edu/wiki/Solvent
Basically from an opensource MIT project to do very close to what you're trying to do.
Alternately, you could contact YC startup http://www.awesomehighlighter.com/ for advice perhaps (which does EXACTLY what you're talking about).