precache: add script to generate diagrams