generate doc automatically