script to make a doc linkage hierarchy tree