script to generate complex scaffolding document