TOC Extraction

Long time…
I just too busy to put my rough code online, here we go: