improve genDocs script so you can just pass a flag to tell it what to do