Print query results in interactive timelines.
FIXME: this code is just insane; rewrite from 0 is probably the only way to get it right